Message273461
Attached patch avoids the creation of a temporary tuple in method_call() and slot_tp_new() by using the new fast call calling convention.
It uses a small buffer allocated on the stack C if the function is called with 4 arguments or less, or it allocates a buffer in the heap memory.
The function also avoids INCREF/DECREF: references are borrowed, not strong references.
The patch adds a private _PyObject_Call_Preprend() helper function written to optimize such way of packing positional arguments, it's like:
args = (obj,) + args
func(*args, **kw) |
|
Date |
User |
Action |
Args |
2016-08-23 14:54:11 | vstinner | set | recipients:
+ vstinner, scoder, serhiy.storchaka |
2016-08-23 14:54:11 | vstinner | set | messageid: <1471964051.45.0.0189105602427.issue27841@psf.upfronthosting.co.za> |
2016-08-23 14:54:11 | vstinner | link | issue27841 messages |
2016-08-23 14:54:11 | vstinner | create | |
|