Sergey Fedoseev <fedoseev.ser...@gmail.com> added the comment:

Previous benchmarks results were obtained with non-LTO build.

Here are results for LTO build:

$ python -m perf timeit -s "from itertools import repeat; _len = repeat(None, 
0).__length_hint__" "_len()" --compare-to=../cpython-master/venv/bin/python 
--duplicate=1000
/home/sergey/tmp/cpython-master/venv/bin/python: ..................... 14.9 ns 
+- 0.2 ns
/home/sergey/tmp/cpython-dev/venv/bin/python: ..................... 13.1 ns +- 
0.5 ns
Mean +- std dev: [/home/sergey/tmp/cpython-master/venv/bin/python] 14.9 ns +- 
0.2 ns -> [/home/sergey/tmp/cpython-dev/venv/bin/python] 13.1 ns +- 0.5 ns: 
1.13x faster (-12%)

$ python -m perf timeit -s "from itertools import repeat; _len = repeat(None, 
2**10).__length_hint__" "_len()" --compare-to=../cpython-master/venv/bin/python 
--duplicate=1000
/home/sergey/tmp/cpython-master/venv/bin/python: ..................... 22.1 ns 
+- 0.1 ns
/home/sergey/tmp/cpython-dev/venv/bin/python: ..................... 20.9 ns +- 
0.4 ns
Mean +- std dev: [/home/sergey/tmp/cpython-master/venv/bin/python] 22.1 ns +- 
0.1 ns -> [/home/sergey/tmp/cpython-dev/venv/bin/python] 20.9 ns +- 0.4 ns: 
1.05x faster (-5%)

$ python -m perf timeit -s "from itertools import repeat; _len = repeat(None, 
2**30).__length_hint__" "_len()" --compare-to=../cpython-master/venv/bin/python 
--duplicate=1000
/home/sergey/tmp/cpython-master/venv/bin/python: ..................... 23.3 ns 
+- 0.0 ns
/home/sergey/tmp/cpython-dev/venv/bin/python: ..................... 21.6 ns +- 
0.1 ns
Mean +- std dev: [/home/sergey/tmp/cpython-master/venv/bin/python] 23.3 ns +- 
0.0 ns -> [/home/sergey/tmp/cpython-dev/venv/bin/python] 21.6 ns +- 0.1 ns: 
1.08x faster (-8%)

$ python -m perf timeit -s "from itertools import repeat; _len = repeat(None, 
2**60).__length_hint__" "_len()" --compare-to=../cpython-master/venv/bin/python 
--duplicate=1000
/home/sergey/tmp/cpython-master/venv/bin/python: ..................... 24.4 ns 
+- 0.1 ns
/home/sergey/tmp/cpython-dev/venv/bin/python: ..................... 22.7 ns +- 
0.1 ns
Mean +- std dev: [/home/sergey/tmp/cpython-master/venv/bin/python] 24.4 ns +- 
0.1 ns -> [/home/sergey/tmp/cpython-dev/venv/bin/python] 22.7 ns +- 0.1 ns: 
1.08x faster (-7%)

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue37802>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to