It looks like you're new here. If you want to get involved, click one of these buttons!

- 16.6K All Categories
- 9.3K Mining
- 540 Pool Discussion
- 219 Promotional
- 1.3K General Project Discussion (non-technical)
- 452 Education
- 784 Protocol and Client discussion
- 158 web3-js
- 28 Whisper
- 15 Swarm
- 3 RLP
- 297 IoT & Hardware
- 1.1K Smart Contracts and Dapps
- 28 Serpent
- 349 Solidity
- 604 Projects
- 1.2K Reference clients code and builds
- 248 Eth & AlethZero- Cpp Implementation
- 466 Geth - Go Implementation
- 240 Mist
- 15 Node.js Implementation
- 36 Python Implementation
- 48 Mix
- 32 Other Implementations
- 165 Meetups
- 38 Other Events
- 221 Jobs & Skills
- 221 Press and Articles
- 75 Audio/Video
- 289 Ether Sale
- 1.1K Other Languages
- 91 Chinese
- 249 German
- 32 Italian
- 109 French
- 3 Hebrew
- 41 Japanese
- 70 Portugese
- 46 Romanian
- 178 Russian
- 223 Spanish
- 43 Turkish
- 123 Watercooler

I will be participating to this forums, since I am doing an ICO soon and I am reading it.

Here is a fun thing. This small function it taking a LOT of time to compile (20s here, while the SNT contract is taking 5 seconds only!)

Maybe some guru can explain why this is taking so much time, there is no loop.

Also the magic of this function is to make run out of gas any contract.

```
function last(uint x) returns (uint) {
uint last=x/1000000000000000000;
if (last<=0) last=x/100000000000000000;
if (last<=0) last=x/10000000000000000;
if (last<=0) last=x/1000000000000000;
if (last<=0) last=x/10000000000000;
if (last<=0) last=x/1000000000000;
if (last<=0) last=x/100000000000;
if (last<=0) last=x/10000000000;
if (last<=0) last=x/1000000000;
if (last<=0) last=x/100000000;
if (last<=0) last=x/10000000;
if (last<=0) last=x/1000000;
if (last<=0) last=x/100000;
if (last<=0) last=x/10000;
if (last<=0) last=x/100;
if (last<=0) last=x/10;
if (last<=0) last=x/1;
return last;
}
```

Have fun!

## Comments

4✭