New submission from Jeroen Demeyer <j.deme...@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 <rep...@bugs.python.org>
<https://bugs.python.org/issue36616>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to