Skip to content

Commit 0969ad2

Browse files
committed
Better tuple hash function.
1 parent cc15b42 commit 0969ad2

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Objects/tupleobject.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -233,7 +233,7 @@ tuplehash(v)
233233
y = hashobject(*p++);
234234
if (y == -1)
235235
return -1;
236-
x = (x + x + x) ^ y;
236+
x = (1000003*x) ^ y;
237237
}
238238
x ^= v->ob_size;
239239
if (x == -1)

0 commit comments

Comments
 (0)