Original Post
i have two 32 bit numbers. between them i want to calculate their distance - distance ist simply the number of bits that are not equal.
my curren (naive) implementation:
unsigned long tmp = x1 ^ x2; int d=0; for(int i=0; ithis is quite slow, especially because i have to do it up to 2^num_important_bits * 500 times... any way to speed it up?