]> granicus.if.org Git - python/commit
bpo-37017: PyObject_CallMethodObjArgs uses LOAD_METHOD optimization (GH-13516)
authorMichael J. Sullivan <sully@msully.net>
Sun, 26 May 2019 07:23:34 +0000 (00:23 -0700)
committerInada Naoki <songofacandy@gmail.com>
Sun, 26 May 2019 07:23:33 +0000 (16:23 +0900)
commit47dd2f9fd86c32a79e77fef1fbb1ce25dc929de6
treef8a1341fc0b1bfe669349714ca90e90686183f8b
parent7114c6504a60365b8b0cd718da0ec8a737599fb9
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.
Misc/NEWS.d/next/C API/2019-05-22-17-33-52.bpo-37107.8BVPR-.rst [new file with mode: 0644]
Objects/call.c