From c1ae79ac3c320923363994fb88f4cc2fa13317ce Mon Sep 17 00:00:00 2001 From: Bruce Hill Date: Sun, 17 Nov 2024 14:33:17 -0500 Subject: Tweak hash function --- stdlib/integers.c | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'stdlib/integers.c') diff --git a/stdlib/integers.c b/stdlib/integers.c index 4f1947d2..1973fa34 100644 --- a/stdlib/integers.c +++ b/stdlib/integers.c @@ -57,8 +57,7 @@ public PUREFUNC bool Int$equal_value(const Int_t x, const Int_t y) { public PUREFUNC uint64_t Int$hash(const Int_t *x, const TypeInfo_t *type) { (void)type; if (__builtin_expect(x->small & 1, 1)) { - int64_t i = (x->small>>2); - return siphash24((void*)&i, sizeof(i)); + return siphash24((void*)x, sizeof(Int_t)); } else { char *str = mpz_get_str(NULL, 16, *x->big); return siphash24((void*)str, strlen(str)); -- cgit v1.2.3