diff options
author | Tim Peters <tim.peters@gmail.com> | 2001-05-27 07:39:22 +0000 |
---|---|---|
committer | Tim Peters <tim.peters@gmail.com> | 2001-05-27 07:39:22 +0000 |
commit | 15d4929ae4ad5206e2f7fa947d632bfba9b8bfd1 (patch) | |
tree | 97abc7e1d28bcb8da6d31d3578759c70b0e2bf41 /Objects/tupleobject.c | |
parent | dac238bd46e95d1736cd6bee11df850a508f433b (diff) | |
download | cpython-git-15d4929ae4ad5206e2f7fa947d632bfba9b8bfd1.tar.gz |
Implement an old idea of Christian Tismer's: use polynomial division
instead of multiplication to generate the probe sequence. The idea is
recorded in Python-Dev for Dec 2000, but that version is prone to rare
infinite loops.
The value is in getting *all* the bits of the hash code to participate;
and, e.g., this speeds up querying every key in a dict with keys
[i << 16 for i in range(20000)] by a factor of 500. Should be equally
valuable in any bad case where the high-order hash bits were getting
ignored.
Also wrote up some of the motivations behind Python's ever-more-subtle
hash table strategy.
Diffstat (limited to 'Objects/tupleobject.c')
0 files changed, 0 insertions, 0 deletions