What is the fastest way to count set bits in UInt32
Asked 2012-08-29T05:46:16.447
24
What is the fastest way to count the number of set bits (i.e. count the number of 1s) in an UInt32 without the use of a look up table? Is there a way to count in O(1)?