You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Avoid temporary method object in PyObject_CallMethod() and PyObject_CallMethodObjArgs() #73997
call_method() of typeobject.c has been optimized to avoid temporary method object and to avoid temporary tuple in the issue bpo-29507.
Optimizing callmethod() of call.c was already discussed on issue bpo-29507 but no decision was taken. Since call.c code is more complex, I created a new issue.
changed the title [-]Use FASTCALL in call.c callmethod() to avoid temporary tuple[/-][+]Avoid temporary method object in PyObject_CallMethod() and PyObject_CallMethodObjArgs()[/+]on Mar 14, 2017
callmethod3.patch of bpo-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.
Activity
vstinner commentedon Mar 14, 2017
call_method() of typeobject.c has been optimized to avoid temporary method object and to avoid temporary tuple in the issue bpo-29507.
Optimizing callmethod() of call.c was already discussed on issue bpo-29507 but no decision was taken. Since call.c code is more complex, I created a new issue.
[-]Use FASTCALL in call.c callmethod() to avoid temporary tuple[/-][+]Avoid temporary method object in PyObject_CallMethod() and PyObject_CallMethodObjArgs()[/+]vstinner commentedon Mar 14, 2017
callmethod3.patch of bpo-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.