[New-bugs-announce] [issue36616] Optimize thread state handling in function call code

Jeroen Demeyer report at bugs.python.org
Fri Apr 12 12:25:26 EDT 2019


New submission from Jeroen Demeyer <J.Demeyer at UGent.be>:

The bytecode interpreter uses an inline function call_function() to handle most function calls. To check for profiling, call_function() needs to call to PyThreadState_GET().

In the reference implementation of PEP 590, I saw that we can remove these PyThreadState_GET() calls by passing the thread state from the main eval loop to call_function().

I suggest to apply this optimization now, because they make sense independently of PEP 580 and PEP 590 and to give a better baseline for performance comparisons.

----------
components: Interpreter Core
messages: 340078
nosy: Mark.Shannon, jdemeyer, petr.viktorin
priority: normal
severity: normal
status: open
title: Optimize thread state handling in function call code
versions: Python 3.8, Python 3.9

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


More information about the New-bugs-announce mailing list