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

Reply via email to