[issue45880] Performance regression of Int object operators. (Python 3.11)

2021-11-23 Thread Guido van Rossum
Change by Guido van Rossum : -- resolution: -> works for me stage: -> resolved status: open -> closed ___ Python tracker ___ ___ P

[issue45880] Performance regression of Int object operators. (Python 3.11)

2021-11-23 Thread Raymond Hettinger
Raymond Hettinger 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 500 loops, best of 11: 41.7 nsec per loop $ python3.10 -m timeit -r 11 -s 'x=5'

[issue45880] Performance regression of Int object operators. (Python 3.11)

2021-11-23 Thread Mark Shannon
Mark Shannon added the comment: > I assume there's something wrong with the OP's methodology for profiling. In a word "cProfile". All cProfile is doing is measuring the overhead of cProfile. That the overhead of cProfile has gone up is not surprising. That it has gone up so much, is a bit su

[issue45880] Performance regression of Int object operators. (Python 3.11)

2021-11-23 Thread Guido van Rossum
Guido van Rossum added the comment: I assume there's something wrong with the OP's methodology for profiling. (Raymond, in your last example there's a -s argument but nothing to run -- does timeit just use "pass" in that case?) -- ___ Python trac

[issue45880] Performance regression of Int object operators. (Python 3.11)

2021-11-23 Thread Irit Katriel
Irit Katriel added the comment: Raymond, your last two results look like 3.10 rather than 3.11. -- ___ Python tracker ___ ___ Pytho

[issue45880] Performance regression of Int object operators. (Python 3.11)

2021-11-23 Thread Irit Katriel
Change by Irit Katriel : -- nosy: +Mark.Shannon, gvanrossum, iritkatriel ___ Python tracker ___ ___ Python-bugs-list mailing list Un

[issue45880] Performance regression of Int object operators. (Python 3.11)

2021-11-23 Thread Raymond Hettinger
Raymond Hettinger added the comment: Here are timings from stock macOS builds from python.org: $ python3.10 --version Python 3.10.0 $ python3.10 -m timeit -r 11 -s 'x=5' 'x^3' # Xor with variable 500 loops, best of 11: 41.4 nsec per loop $ python3.10 -m timeit -r 11 -s 'x=5' 'x+3'

[issue45880] Performance regression of Int object operators. (Python 3.11)

2021-11-23 Thread Xinhang Xu
New submission from Xinhang Xu : Hello. I'm working on a compute-bound project recently, so I tested several Python versions on my PC (Windows 10 64-bit), about Python's performance on operating Int object. All Python binaries are official distributions. Testcase #1 (simple xor op) Source: