Raymond Hettinger <raymond.hettin...@gmail.com> added the comment:

Reposting with more careful timing runs.  No regression was observed.

$ python3.10 --version
Python 3.10.0
$ python3.10 -m timeit -r 11 -s 'x=5' 'x^3'    # Xor with variable
5000000 loops, best of 11: 41.7 nsec per loop
$ python3.10 -m timeit -r 11 -s 'x=5' 'x+3'    # Add with variable
10000000 loops, best of 11: 22.7 nsec per loop
$ python3.10 -m timeit -r 11 '5+3'             # Constant folded
50000000 loops, best of 11: 7.22 nsec per loop

$ python3.11 --version
Python 3.11.0a2
$ python3.11 -m timeit -r 11 -s 'x=5' 'x^3'    # Xor with variable
20000000 loops, best of 11: 19.4 nsec per loop
$ python3.11 -m timeit -r 11 -s 'x=5' 'x+3'    # Add with variable
20000000 loops, best of 11: 17 nsec per loop
$ python3.11 -m timeit -r 11 '5+3'             # Constant folded
50000000 loops, best of 11: 7.27 nsec per loop

----------

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

Reply via email to