Issue 29811: Avoid temporary method object in PyObject_CallMethod() and PyObject_CallMethodObjArgs() (original) (raw)

Issue29811

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:44 admin set github: 73997
2021-09-21 22:20:34 vstinner set status: open -> closedresolution: out of datestage: resolved
2017-03-14 21:45:03 vstinner set messages: +
2017-03-14 21:41:20 vstinner set title: 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:22 vstinner create