Really fast bitset decoding for “average” densities

Suppose I give you a word and you need to determine the location of the 1-bits. For example, given the word 0b100011001, you would like to get 0,3,4,8. You could check the value of each bit, but that would take too long. A better approach is use the fact that modern processors have fast instructions … Continue reading Really fast bitset decoding for “average” densities