[New-bugs-announce] [issue36926] Implement methoddescr_call without _PyMethodDef_RawFastCallDict

Jeroen Demeyer report at bugs.python.org
Wed May 15 11:46:01 EDT 2019


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

Once PEP 590 is implemented, it makes sense to focus on using the new "vectorcall" calling convention, which is essentially what is currently FastCallKeywords. To simplify things, it would also be good to use FastCallDict in as few places as possible and actually get rid of that completely.

One place where using FastCallKeywords instead of FastCallDict is bad for performance is when using METH_VARARGS|METH_KEYWORDS: the dict would be converted to a tuple and then back to a dict. For builtin_function_or_method instances, there is already special code to deal with METH_VARARGS. But for method_descriptor, there is no such code and this issue fixes that.

More precisely, a specialized function is used for implementing calls of method_descriptor with the METH_VARARGS|METH_KEYWORDS signature. Other calls use FastCallKeywords instead, in which case there is no performance loss.

----------
components: Interpreter Core
messages: 342579
nosy: Mark.Shannon, jdemeyer, petr.viktorin
priority: normal
severity: normal
status: open
title: Implement methoddescr_call without _PyMethodDef_RawFastCallDict
versions: Python 3.8

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


More information about the New-bugs-announce mailing list