classification
Title: Avoid temporary method object in PyObject_CallMethod() and PyObject_CallMethodObjArgs()
Type: performance Stage:
Components: Versions: Python 3.7
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: haypo, inada.naoki
Priority: normal Keywords:

Created on 2017-03-14 21:36 by haypo, last changed 2017-03-14 21:45 by haypo.

Messages (2)
msg289620 - (view) Author: STINNER Victor (haypo) * (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 (haypo) * (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
2017-03-14 21:45:03hayposetmessages: + msg289622
2017-03-14 21:41:20hayposettitle: 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:22haypocreate