[issue26814] Add a new _PyObject_CallStack() function which avoids the creation of a tuple or dict for arguments

Serhiy Storchaka report at bugs.python.org
Thu Apr 21 05:53:53 EDT 2016


Serhiy Storchaka added the comment:

"Stack" in the function name looks a little confusing. I understand that this is related to the stack of bytecode interpreter, but this looks as raising pretty deep implementation detail. The way of packing positional and keyword arguments in the continuous array is not clear. Wouldn't be better to provide separate arguments for positional and keyword arguments?

What is the performance effect of using this function? For example compare the performance of namedtuple's attribute access of current code, the code with with this patch, and unoptimized code in 3.4:

    ./python -m timeit -r 11 -s "from collections import namedtuple as n; a = n('n', 'a b c')(1, 2, 3)" -- "a.a"

Is there any use of this function with keyword arguments?

----------

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


More information about the Python-bugs-list mailing list