diff options
author | Victor Stinner <victor.stinner@gmail.com> | 2017-01-11 00:07:40 +0100 |
---|---|---|
committer | Victor Stinner <victor.stinner@gmail.com> | 2017-01-11 00:07:40 +0100 |
commit | a8ccebab461e0c74a522f55fc25bef949d34ef29 (patch) | |
tree | 1545bc32a1f45b7fe99fd4723f3725eb8629bff1 /Python | |
parent | 51dfa40527856e074b7629c184be7e418efc0867 (diff) | |
download | cpython-a8ccebab461e0c74a522f55fc25bef949d34ef29.tar.gz |
call_method() now uses _PyObject_FastCall()
Issue #29233: Replace the inefficient _PyObject_VaCallFunctionObjArgs() with
_PyObject_FastCall() in call_method() and call_maybe().
Only a few functions call call_method() and call it with a fixed number of
arguments. Avoid the complex and expensive _PyObject_VaCallFunctionObjArgs()
function, replace it with an array allocated on the stack with the exact number
of argumlents.
It reduces the stack consumption, bytes per call, before => after:
test_python_call: 1168 => 1152 (-16 B)
test_python_getitem: 1344 => 1008 (-336 B)
test_python_iterator: 1568 => 1232 (-336 B)
Remove the _PyObject_VaCallFunctionObjArgs() function which became useless.
Rename it to object_vacall() and make it private.
Diffstat (limited to 'Python')
0 files changed, 0 insertions, 0 deletions