Re: PowerPC G5, 64-bit long long, bit counting and inline assembler...

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi Gordon,

Another solution that may-or-may-not be better (profile to find out) is to do a 2048 sized (11-bit) lookup table and use 3 lookups.  Or 6 lookups for a 64-bit number.

Another solution is the "divide-and-conquer" folding bit-twiddling method.

Note, there is a couple of shortcomings on the "x & (x-1)" trick.  I presume you are aware of those shortcomings.

HTH,
--Eljay



[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux