mirror of
https://github.com/python/cpython.git
synced 2025-11-20 02:50:14 +00:00
bpo-37017: PyObject_CallMethodObjArgs uses LOAD_METHOD optimization (GH-13516)
Update PyObject_CallMethodObjArgs and _PyObject_CallMethodIdObjArgs to use _PyObject_GetMethod to avoid creating a bound method object in many cases. On a microbenchmark of PyObject_CallMethodObjArgs calling a method on an interpreted Python class, this optimization resulted in a 1.7x speedup.
This commit is contained in:
parent
7114c6504a
commit
47dd2f9fd8
2 changed files with 35 additions and 18 deletions
|
|
@ -0,0 +1,4 @@
|
|||
Update :c:func:`PyObject_CallMethodObjArgs` and ``_PyObject_CallMethodIdObjArgs``
|
||||
to use ``_PyObject_GetMethod`` to avoid creating a bound method object in many
|
||||
cases.
|
||||
Patch by Michael J. Sullivan.
|
||||
Loading…
Add table
Add a link
Reference in a new issue