[issue36616] Optimize thread state handling in function call code

Jeroen Demeyer report at bugs.python.org
Mon Apr 15 09:29:22 EDT 2019


Jeroen Demeyer <J.Demeyer at UGent.be> added the comment:

The gain is small, but it's there.

I made some further changes:

- replacing code of the form

    sp = stack_pointer;
    call_function(..., &sp, ...)
    stack_pointer = sp;

  by

    call_function(..., &stack_pointer, ...)

- fold the inline function do_call_core() in the main eval loop (the function became so small that there was no longer a reason to pull it out of the main loop)

- removed pointless check PyMethod_GET_SELF(func) != NULL (methods always have self != NULL)

----------

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


More information about the Python-bugs-list mailing list