Not that it is likely to matter much, but this version of my_log2 is significantly faster on intel i386 and later.