Bukkit/CraftBukkit — comment on commit 7deb43b31170d0e7a2325dd4aa68121a74df52aa
File:  line 0
By winex:

ffs, Notch and all you guys are crazy!
C/C++ guys would easily use powers of two with a simple bitwise-and,sub,etc operators. in such case, the number of orbs would be number of bits set (to 1), maxed at 32 for java's int type.
...256,512,1024,2048,4096... nothing hand-written here, hardware already have such values. very small difference is against using primes!

quick example: https://gist.github.com/1283243
beautiful stuff, as for me. ppl should be more lazy :P
that do-while loop could be, possibly, rewritten.

google for "count bits set" for explanation.
```uint32_t value = 0x8421;
for (uint32_t bits = value; bits; bits &= bits - 1)
printf("0x%08x\n", bits);
```
decrement is, probably, the magic here. :)

minecraft is damn suprising: what code one should write to make a server (and client, too) so incredibly hungry in CPU and MEM?.
mineserver (C++, http://mineserver.be/) on the other hand, uses about 10+ times less memory. but it needs some help as it lacks many vanilla features: reimplementing all the minecraft server stuff isn't that fast as decompiling :P