[New-bugs-announce] [issue29233] call_method(): call _PyObject_FastCall() rather than _PyObject_VaCallFunctionObjArgs()

STINNER Victor report at bugs.python.org
Tue Jan 10 18:05:00 EST 2017


New submission from STINNER Victor:

Recently, I modified call_method() and call_maybe() of Objects/typeobject.c to avoid the creation of a temporary tuple: replace Py_VaBuildValue()+PyObject_Call() with the new _PyObject_VaCallFunctionObjArgs().

But while working on the issue #28870, I noticed that _PyObject_VaCallFunctionObjArgs() is not efficient and can be avoided. In typeobject.c, the number of arguments is hardcoded, so we don't need complex functions to compute the number of arguments and decide to allocate an array on the stack or on the heap.

----------
messages: 285165
nosy: haypo
priority: normal
severity: normal
status: open
title: call_method(): call _PyObject_FastCall() rather than _PyObject_VaCallFunctionObjArgs()

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue29233>
_______________________________________


More information about the New-bugs-announce mailing list