[New-bugs-announce] [issue37562] PEP 590 implementation introduced a performance regression

Pablo Galindo Salgado report at bugs.python.org
Thu Jul 11 07:26:56 EDT 2019


New submission from Pablo Galindo Salgado <pablogsal at gmail.com>:

Many functions are significantly slower after commit aacc77fbd77640a8f03638216fa09372cc21673d was applied:

aacc77fbd77640a8f03638216fa09372cc21673d is the first bad commit
commit aacc77fbd77640a8f03638216fa09372cc21673d
Author: Jeroen Demeyer <J.Demeyer at UGent.be>
Date:   Wed May 29 20:31:52 2019 +0200

    bpo-36974: implement PEP 590 (GH-13185)


    Co-authored-by: Jeroen Demeyer <J.Demeyer at UGent.be>
    Co-authored-by: Mark Shannon <mark at hotpy.org>


Experiment in 3.8 
-----------------

./python -m perf timeit -s '_len=len' '_len("hello")'
.....................
Mean +- std dev: 157 ns +- 3 ns


Experiment in parent of aacc77fbd77640a8f03638216fa09372cc21673d
----------------------------------------------------------------

python -m perf timeit -s '_len=len' '_len("hello")'
.....................
Mean +- std dev: 133 ns +- 3 ns


The same regression happens consistently in many other functions (hex, len, deque methods....)

----------
components: Interpreter Core
keywords: 3.8regression
messages: 347672
nosy: Mark.Shannon, jdemeyer, pablogsal, petr.viktorin, rhettinger
priority: high
severity: normal
status: open
title: PEP 590 implementation introduced a performance regression
type: performance
versions: Python 3.8, Python 3.9

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


More information about the New-bugs-announce mailing list