Tweak hash computation
@@ -95,9 +95,9 @@ static uint32_t hash(key_type key, uint32_t mod) {
p = (uint8_t *)&key;
end = p + sizeof(key_type);
- for (; p != end; ++p) {
- h ^= *p;
- h *= 0x01000193u;
+ for (; p != end;) {
+ h ^= *p++;
+ h += (h << 1) + (h << 4) + (h << 7) + (h << 8) + (h << 24);
}
return h & (mod - 1);
