More improvements to hashing for #889

This commit is contained in:
Calvin Rose
2021-12-06 17:23:00 -06:00
parent e8ad311d84
commit f9891a5c04
2 changed files with 3 additions and 2 deletions
+1 -1
View File
@@ -324,7 +324,7 @@ 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));
hash = (int32_t)((hi ^ (lo >> 3)) * 2654435769u);
break;
}
case JANET_ABSTRACT: {