Address - Switch high and low bits of part of number hash (Knuth's multiplicative hash)
Also make sure we weren't throwing away 3 bits of entropy.
@@ -324,7 +324,8 @@ int32_t janet_hash(Janet x) {
as.d = janet_unwrap_number(x);
uint32_t lo = (uint32_t)(as.u & 0xFFFFFFFF);
uint32_t hi = (uint32_t)(as.u >> 32);
- hash = (int32_t)((hi ^ (lo >> 3)) * 2654435769u);
+ uint32_t hilo = (hi ^ lo) * 2654435769u;
+ hash = (int32_t)((hilo << 16) | ((hilo >> 16) & 0xFFFF));
break;
}
case JANET_ABSTRACT: {
