Inada Naoki <songofaca...@gmail.com> added the comment:
I am not sure this is worth doing. Microbenchmarks: ## import time ``` $ main/opt/bin/pyperf command main/opt/bin/python3 -c 'import typing,asyncio' ..................... command: Mean +- std dev: 49.6 ms +- 0.1 ms $ siphash13/opt/bin/pyperf command siphash13/opt/bin/python3 -c 'import typing,asyncio' ..................... command: Mean +- std dev: 49.3 ms +- 0.1 ms ``` 0.6% faster. ## hash(s+'a') ``` # 6+1 $ siphash13/opt/bin/pyperf timeit --compare-to main/opt/bin/python3 --python-names siphash24:siphash13 -s 'b=b"x"*6' -- 'hash(b+b"a")' siphash24: ..................... 87.7 ns +- 2.8 ns siphash13: ..................... 84.8 ns +- 1.6 ns Mean +- std dev: [siphash24] 87.7 ns +- 2.8 ns -> [siphash13] 84.8 ns +- 1.6 ns: 1.03x faster # 6000+1 $ siphash13/opt/bin/pyperf timeit --compare-to main/opt/bin/python3 --python-names siphash24:siphash13 -s 'b=b"x"*6000' -- 'hash(b+b"a")' siphash24: ..................... 2.98 us +- 0.03 us siphash13: ..................... 1.67 us +- 0.03 us Mean +- std dev: [siphash24] 2.98 us +- 0.03 us -> [siphash13] 1.67 us +- 0.03 us: 1.78x faster ``` ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue29410> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com