diff options
author | Guido van Rossum <guido@python.org> | 1996-12-16 17:55:46 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 1996-12-16 17:55:46 (GMT) |
commit | 0969ad213d73a052e66ebf83cb4eae48a0dd7b55 (patch) | |
tree | 10d12fda01837c5c11b081f578ab5a2f0f52ca79 /Objects | |
parent | cc15b42e5919548e8d7008776f4c87f2267a00b3 (diff) | |
download | cpython-0969ad213d73a052e66ebf83cb4eae48a0dd7b55.zip cpython-0969ad213d73a052e66ebf83cb4eae48a0dd7b55.tar.gz cpython-0969ad213d73a052e66ebf83cb4eae48a0dd7b55.tar.bz2 |
Better tuple hash function.
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/tupleobject.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/Objects/tupleobject.c b/Objects/tupleobject.c index fe3da55..fd53c30 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) |