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.

classification
Title: Avoid temporary method object in PyObject_CallMethod() and PyObject_CallMethodObjArgs()
Type: performance Stage: resolved
Components: Versions: Python 3.7
process
Status: closed Resolution: out of date
Dependencies: Superseder:
Assigned To: Nosy List: methane, vstinner
Priority: normal Keywords:

Created on 2017-03-14 21:36 by vstinner, last changed 2022-04-11 14:58 by admin. This issue is now closed.

Messages (2)
msg289620 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-03-14 21:36
call_method() of typeobject.c has been optimized to avoid temporary method object and to avoid temporary tuple in the issue #29507.

Optimizing callmethod() of call.c was already discussed on issue #29507 but no decision was taken. Since call.c code is more complex, I created a new issue.
msg289622 - (view) Author: STINNER Victor (vstinner) * (Python committer) Date: 2017-03-14 21:45
callmethod3.patch of #29507 implements proposed optimization, but only when there is no positional argument. The patch doesn't apply cleanly since the code evolved, including a major refactoring: new Objects/call.c file.
History
Date User Action Args
2022-04-11 14:58:44adminsetgithub: 73997
2021-09-21 22:20:34vstinnersetstatus: open -> closed
resolution: out of date
stage: resolved
2017-03-14 21:45:03vstinnersetmessages: + msg289622
2017-03-14 21:41:20vstinnersettitle: Use FASTCALL in call.c callmethod() to avoid temporary tuple -> Avoid temporary method object in PyObject_CallMethod() and PyObject_CallMethodObjArgs()
2017-03-14 21:36:22vstinnercreate