This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients scoder, serhiy.storchaka, vstinner
Date 2016-08-23.14:54:11
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1471964051.45.0.0189105602427.issue27841@psf.upfronthosting.co.za>
In-reply-to
Content
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)
History
Date User Action Args
2016-08-23 14:54:11vstinnersetrecipients: + vstinner, scoder, serhiy.storchaka
2016-08-23 14:54:11vstinnersetmessageid: <1471964051.45.0.0189105602427.issue27841@psf.upfronthosting.co.za>
2016-08-23 14:54:11vstinnerlinkissue27841 messages
2016-08-23 14:54:11vstinnercreate