idealvin / gitalk

comments for Alvin's blog
0 stars 0 forks source link

Hash | Documents for Coost #119

Open idealvin opened 1 year ago

idealvin commented 1 year ago

https://coostdocs.github.io/en/co/other/hash/

include: co/hash.h.

Hash #hash32 uint32 hash32(const void s, size_t n); uint32 hash32(const char s); uint32 hash32(const fastring& s) uint32 hash32(const std::string& s); This function returns a 32-bit murmur hash value. When s is a pointer, it is required to be sizeof(void) byte aligned. #hash64 uint64 hash64(const void s, size_t n); uint64 hash64(const char* s); uint64 hash64(const fastring& s); uint64 hash64(const std::string& s); This function returns a 64-bit murmur hash value. When s is a pointer, it is required to be 8-byte aligned.