[issue19183] PEP 456 Secure and interchangeable hash algorithm
Antoine Pitrou
report at bugs.python.org
Sun Oct 6 21:28:09 CEST 2013
Antoine Pitrou added the comment:
Microbenchmarking hash computation (Linux, gcc 4.7.3):
* Short strings:
python -m timeit -s "b=b'x'*20" "hash(memoryview(b))"
- 64-bit build, before: 0.263 usec per loop
- 64-bit build, after: 0.263 usec per loop
- 32-bit build, before: 0.303 usec per loop
- 32-bit build, after: 0.358 usec per loop
* Long strings:
python -m timeit -s "b=b'x'*1000" "hash(memoryview(b))"
- 64-bit build, before: 1.56 usec per loop
- 64-bit build, after: 1.03 usec per loop
- 32-bit build, before: 1.61 usec per loop
- 32-bit build, after: 2.46 usec per loop
Overall, performance looks fine to me.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue19183>
_______________________________________
More information about the Python-bugs-list
mailing list