Use a faster way to count 1's (used by Hamming)