Determining number of dict key collisions in a dictionary

python at python at
Tue Dec 2 13:39:54 CET 2008

Is there any way to determine the number of dictionary key
collisions in a specific dictionary?
Background: I'm working on a project using very large
dictionaries (64 bit Python) and question from my client is how
effective is Python's default hash technique for our data set?
Their concern is based on the belief that Python's default
dictionary hash scheme is optimized for 32 bit vs. 64 bit
environments and may not have anticipated the additional range of
keys that can be generated in a 64 bit environment. Our keys are
based on 20 to 44 byte ASCII (7-bit) alpha-numeric strings.
Thank you,
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <>

More information about the Python-list mailing list