[Python-Dev] PyObject_CallFunction(func, "O", arg) special case
storchaka at gmail.com
Sat Dec 10 01:55:23 EST 2016
On 09.12.16 19:46, Victor Stinner wrote:
> Last days, I patched functions of PyObject_CallFunction() family to
> use internally fast calls. I implemented the special case to keep
> backward compatibility.
> I replaced a lot of code using PyObject_CallFunction() with
> PyObject_CallFunctionObjArgs() when the format string was only made of
> "O", PyObject* arguments. I made this change to optimize the code, but
> indirectly, it avoids also the special case for code which used
> exactly "O" format. See:
I didn't have a change to make a review of your patches, because they
were pushed 7 minutes after publishing a patch. I'm still in the process
of post-commit reviewing. Could you please give more time for pre-commit
I thought about similar changes, but since I didn't have evidences that
they cause performance gain, I dropped my patches. Do you have benchmark
results that proof the speed up for all your changes?
Did you checked that your changes do not increase C stack consumption?
More information about the Python-Dev