[issue16427] Faster hash implementation

Antoine Pitrou report at bugs.python.org
Sun Nov 11 00:26:40 CET 2012


Antoine Pitrou added the comment:

The patch is too optimistic, it gives different results depending on the alignment of the memory buffer:

>>> b = b"abcd"*100
>>> hash(b[1:])
7264687738704559842
>>> hash(memoryview(b)[1:])
9054791208347464792
>>> memoryview(b)[1:] == b[1:]
True

----------
nosy: +pitrou
stage:  -> patch review

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


More information about the Python-bugs-list mailing list