[issue38436] Improved performance for list addition.
Brandt Bucher
report at bugs.python.org
Fri Oct 11 15:24:51 EDT 2019
Brandt Bucher <brandtbucher at gmail.com> added the comment:
Serhiy, here are the better performance measurements:
$ ./python.exe -m pyperf timeit --duplicate=1000 -s z=0 z+0 # list-add
.....................
Mean +- std dev: 17.3 ns +- 0.3 ns
$ ./python.exe -m pyperf timeit --duplicate=1000 -s z=0 z+0 # master
.....................
Mean +- std dev: 17.2 ns +- 0.3 ns
$ ./python.exe -m pyperf timeit --duplicate=1000 -s l=[0,1,2,3] [0,1,2,3]+l # New branch
.....................
Mean +- std dev: 92.6 ns +- 1.7 ns
$ ./python.exe -m pyperf timeit --duplicate=1000 -s l=[0,1,2,3] l+[0,1,2,3] # Old branch
.....................
Mean +- std dev: 99.8 ns +- 1.4 ns
Honestly, I'll defer to you here. If you feel like pursuing this is a total waste of time, I'll just close the issue/PR. Otherwise I can explore how often the branch is hit in production code, as you suggested.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue38436>
_______________________________________
More information about the Python-bugs-list
mailing list