[issue27128] Add _PyObject_FastCall()

Stefan Behnel report at bugs.python.org
Mon Aug 22 13:52:38 EDT 2016


Stefan Behnel added the comment:

> What do you mean by "I copied your (no-kwargs) implementation"?

I copied what you committed into CPython for _PyFunction_FastCall():

https://github.com/cython/cython/commit/8f3d3bd199a3d7f2a9fdfec0af57145b3ab363ca

and then enabled its usage in a couple of places:

https://github.com/cython/cython/commit/a3cfec8f7bd6d585831dd6669f6dad5f88303c71

especially for all function/method calls that we generate for user code:

https://github.com/cython/cython/commit/a51df339f395634f57b77e3ec13cecb3a28a5462

Note that PyMethod objects get unpacked into function+self right before the PyFunction_Check(), so the tuple avoidance optimisation also applies to Python method calls.

----------

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


More information about the Python-bugs-list mailing list