0
下面是示例代码SSE4a与Python中的ctypes? (GCC __builtin_popcount)
Efficiently find binary strings with low Hamming distance in large set
static inline int distance(unsigned x, unsigned y)
{
return __builtin_popcount(x^y);
}
是否有可能重写在python使用ctypes的 (优选赢/ *尼克斯兼容)上述GCC代码?
TIA!
'__builtin_ *'是GCC内置的,而不是C函数,所以我不希望'ctypes'能够调用它们。 – ephemient