[issue29735] Optimize functools.partial() for positional arguments

STINNER Victor report at bugs.python.org
Tue Mar 14 06:35:05 EDT 2017


STINNER Victor added the comment:

> If the underlying function doesn't support fast call, and both args and pto->args are not empty, patched partial_call() makes one unneeded copyings.

The simple workaround is to revert changes using FASTCALL in partial_call().

But for best performances, it seems like we need two code paths depending if the function supports fastcall or not. I will try to write a patch for that.

----------

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


More information about the Python-bugs-list mailing list