summaryrefslogtreecommitdiff
path: root/Python/strdup.c
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-06-10 22:41:48 +0000
committerRaymond Hettinger <python@rcn.com>2004-06-10 22:41:48 +0000
commitc978633ec6e6562a748057e727737cb1446e015d (patch)
tree7e3d5600708371923149265752377f410a63f1b2 /Python/strdup.c
parent27e403ebe914294d307348d2b83c39f96059e133 (diff)
downloadcpython-git-c978633ec6e6562a748057e727737cb1446e015d.tar.gz
Futher improvements to frozenset hashing (based on Yitz Gale's battery of
tests which nicely highly highlight weaknesses). * Initial value is now a large prime. * Pre-multiply by the set length to add one more basis of differentiation. * Work a bit harder inside the loop to scatter bits from sources that may have closely spaced hash values. All of this is necessary to make up for keep the hash function commutative. Fortunately, the hash value is cached so the call to frozenset_hash() will only occur once per set.
Diffstat (limited to 'Python/strdup.c')
0 files changed, 0 insertions, 0 deletions