classification
Title: Implement methoddescr_call without _PyMethodDef_RawFastCallDict
Type: Stage: patch review
Components: Interpreter Core Versions: Python 3.8
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: Mark.Shannon, jdemeyer, petr.viktorin
Priority: normal Keywords: patch

Created on 2019-05-15 15:46 by jdemeyer, last changed 2019-05-15 15:48 by jdemeyer.

Pull Requests
URL Status Linked Edit
PR 13342 open jdemeyer, 2019-05-15 15:48
Messages (1)
msg342579 - (view) Author: Jeroen Demeyer (jdemeyer) * Date: 2019-05-15 15:46
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.
History
Date User Action Args
2019-05-15 15:48:29jdemeyersetkeywords: + patch
stage: patch review
pull_requests: + pull_request13254
2019-05-15 15:46:01jdemeyercreate