Here is the sample code
Efficiently find binary strings with low Hamming distance in large set
static inline int distance(unsigned x, unsigned y)
{
return __builtin_popcount(x^y);
}
Is it possible to rewrite the above gcc code in python using ctypes (preferably Win/*nix compatible)?
TIA!