Fast hash for strings
As of Python 3 this method does not work: Python has a built-in hash() function that’s very fast and perfect for most uses: >>> hash(“dfds”) 3591916071403198536 You can then make it unsigned: >>> hashu=lambda word: ctypes.c_uint64(hash(word)).value You can then turn it into a 16 byte hex string: >>> hashu(“dfds”).to_bytes(8,”big”).hex() Or an N*2 byte string, where … Read more