[issue27841] Use fast call in method_call() and slot_tp_new()

STINNER Victor report at bugs.python.org
Wed Aug 24 19:19:06 EDT 2016


STINNER Victor added the comment:

> Tuples use a freelist ;-)

Honestly, I didn't expect that my "fast call" thing would give any significant speedup. I know that tuple allocator uses a free list.

Fast calls allows to avoid INCREF/DECREF on each argument, can use the C stack for short memory allocations and C arrays are not tracked by the garbage collector. It looks like all these minor things altogether provides a concrete and significant speedup on benchmarks.

So, I pushed call_prepend.patch with two changes:

* Fix a typo in the function name :-D
* Fix a reference leak in slot_tp_new() ;-)

----------
resolution:  -> fixed
status: open -> closed

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue27841>
_______________________________________


More information about the Python-bugs-list mailing list