I need to determine whether the number of bits set in a variable of some type (it might be a 32-bit unsigned or a 64-bit unsigned) is odd, or not. I've read:
How to count the number of set bits in a 32-bit integer?
Which is of course quite useful, but I want to do better since I only need a binary answer, not the whole count. I suppose replacing the one-byte or two-byte LUT should be pretty fast, but maybe the non-LUT code can be improved somehow.