mirror of
https://github.com/python/cpython.git
synced 2025-09-26 18:29:57 +00:00
Better tuple hash function.
This commit is contained in:
parent
cc15b42e59
commit
0969ad213d
1 changed files with 1 additions and 1 deletions
|
@ -233,7 +233,7 @@ tuplehash(v)
|
||||||
y = hashobject(*p++);
|
y = hashobject(*p++);
|
||||||
if (y == -1)
|
if (y == -1)
|
||||||
return -1;
|
return -1;
|
||||||
x = (x + x + x) ^ y;
|
x = (1000003*x) ^ y;
|
||||||
}
|
}
|
||||||
x ^= v->ob_size;
|
x ^= v->ob_size;
|
||||||
if (x == -1)
|
if (x == -1)
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue