From 118dc224ef5f1481dddfb96a98b84d9a97bd91e6 Mon Sep 17 00:00:00 2001 From: Kaz Kylheku Date: Fri, 25 Oct 2019 07:54:45 -0700 Subject: hashing: partially revert 63feff9c. Mixing the hash seed with the hashes for characters, fixnums and pointers by multiplication doesn't make sense. It doesn't perturb the hash sufficiently. * hash.c (equal_hash): Do not multiply the hash by the seed for CHR, NUM, SYM, PKG and ENV. --- hash.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/hash.c b/hash.c index f06fea61..27d62dba 100644 --- a/hash.c +++ b/hash.c @@ -217,17 +217,17 @@ ucnum equal_hash(val obj, int *count, ucnum seed) case STR: return hash_c_str(obj->st.str, seed, count); case CHR: - return c_chr(obj) * seed; + return c_chr(obj); case NUM: - return c_num(obj) * seed; + return c_num(obj); case SYM: case PKG: case ENV: switch (CHAR_BIT * sizeof (mem_t *)) { case 32: - return (coerce(ucnum, obj) >> 4) * seed; + return coerce(ucnum, obj) >> 4; case 64: default: - return (coerce(ucnum, obj) >> 5) * seed; + return coerce(ucnum, obj) >> 5; } break; case FUN: -- cgit v1.2.3