From 0969ad213d73a052e66ebf83cb4eae48a0dd7b55 Mon Sep 17 00:00:00 2001 From: Guido van Rossum Date: Mon, 16 Dec 1996 17:55:46 +0000 Subject: [PATCH] Better tuple hash function. --- Objects/tupleobject.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index fe3da5576f..fd53c300cb 100644 --- a/Objects/tupleobject.c +++ b/Objects/tupleobject.c @@ -233,7 +233,7 @@ tuplehash(v) y = hashobject(*p++); if (y == -1) return -1; - x = (x + x + x) ^ y; + x = (1000003*x) ^ y; } x ^= v->ob_size; if (x == -1) -- 2.50.1