[issue16427] Faster hash implementation

Christian Heimes report at bugs.python.org
Sun Oct 27 21:27:40 CET 2013


Christian Heimes added the comment:

Antoine, I have addressed your concern "Well, the quality of the hash function is clearly reduced" in patch http://hg.python.org/features/pep-456/rev/765930d944a5

>>> s = set()
>>> for i in range(256):
...     s.add(hash("abcdfeg" + chr(i)) & 0xff)
... 
>>> len(s)
256
>>> s = set()
>>> for i in range(256):
...     s.add(hash("abcdfeghabcdefg" + chr(i)) & 0xff)
... 
>>> len(s)
256

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue16427>
_______________________________________


More information about the Python-bugs-list mailing list