CC
Size: a a a
CC
EP
EP
CC
CC
CC
CC
f&
CC
🦊
#include <stdint.h>
uint64_t hash_c_string(const char* in, uint64_t seed) {
while (*in++ != 0) {
seed ^= *in + 0x9e3779b9 + (seed << 6) + (seed >> 2);
}
return seed;
}
CC
CC
🦊
🦊
CC
#include <stdint.h>
uint64_t hash_c_string(const char* in, uint64_t seed) {
while (*in++ != 0) {
seed ^= *in + 0x9e3779b9 + (seed << 6) + (seed >> 2);
}
return seed;
}
🦊
phi = (1 + sqrt(5)) / 2константа вот
2^32 / phi = 0x9e3779b9
p
🦊
CC
🦊