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