[issue39737] Speed up list.__eq__ by about 6%

Dong-hee Na report at bugs.python.org
Tue Feb 25 10:08:23 EST 2020


Dong-hee Na <donghee.na92 at gmail.com> added the comment:

IMHO, I can not see a noticeable performance improvement.
I think that the modern compiler will optimize the reused variable. ;)
The below result might be noise.


[master]
./python.exe -m pyperf timeit "A = list(range(10**3)); B = list(range(10**3))" "A==B"
.....................
Mean +- std dev: 415 us +- 6 us

[PR 18638]
./python.exe -m pyperf timeit "A = list(range(10**3)); B = list(range(10**3))" "A==B"
.....................
Mean +- std dev: 433 us +- 20 us

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39737>
_______________________________________


More information about the Python-bugs-list mailing list