Bit Twiddling Hacks
ctwardell
Posts: 1,716
A friend of mine recently had a job interview where one of the questions was to show a solution for counting the number of set bits in a large group of integers. While discussing this with him afterward I found this page of algorithms that may be of interest.
http://graphics.stanford.edu/~seander/bithacks.html
C.W.
http://graphics.stanford.edu/~seander/bithacks.html
C.W.