Am 16.01.2007 um 11:24 schrieb Gustaf Neumann:
if all cases are used, all but the first loops are executed mostly once and could be changed into ifs... i will send you with a separate mail on such variant, but i am running currently out of battery.
Guess what: it is _slower_ now then the s = (size-1) >> 3; while (s>1) {s >>= 1; bucket++;} I tend to like that one as it is really neat. It will also better illustrate what is being done. Watch: _slower_ means about 1-2%, so I do not believe we need to improve on that any more. The above version is I believe most "opportune" as it is readable (thus understandable) and very fast.