- 17.3K All Categories
- 9.5K Mining
- 574 Pool Discussion
- 378 Promotional
- 1.4K General Project Discussion (non-technical)
- 485 Education
- 811 Protocol and Client discussion
- 170 web3-js
- 29 Whisper
- 16 Swarm
- 3 RLP
- 303 IoT & Hardware
- 1.2K Smart Contracts and Dapps
- 28 Serpent
- 359 Solidity
- 664 Projects
- 1.2K Reference clients code and builds
- 249 Eth & AlethZero- Cpp Implementation
- 471 Geth - Go Implementation
- 242 Mist
- 15 Node.js Implementation
- 36 Python Implementation
- 49 Mix
- 36 Other Implementations
- 170 Meetups
- 40 Other Events
- 226 Jobs & Skills
- 281 Press and Articles
- 75 Audio/Video
- 296 Ether Sale
- 1.2K Other Languages
- 96 Chinese
- 255 German
- 33 Italian
- 111 French
- 3 Hebrew
- 42 Japanese
- 75 Portugese
- 46 Romanian
- 185 Russian
- 231 Spanish
- 47 Turkish
- 125 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✭