summaryrefslogtreecommitdiffstats
path: root/Misc/NEWS.d
diff options
context:
space:
mode:
authorMichael J. Sullivan <sully@msully.net>2019-05-26 07:23:34 (GMT)
committerInada Naoki <songofacandy@gmail.com>2019-05-26 07:23:33 (GMT)
commit47dd2f9fd86c32a79e77fef1fbb1ce25dc929de6 (patch)
treef8a1341fc0b1bfe669349714ca90e90686183f8b /Misc/NEWS.d
parent7114c6504a60365b8b0cd718da0ec8a737599fb9 (diff)
downloadcpython-47dd2f9fd86c32a79e77fef1fbb1ce25dc929de6.zip
cpython-47dd2f9fd86c32a79e77fef1fbb1ce25dc929de6.tar.gz
cpython-47dd2f9fd86c32a79e77fef1fbb1ce25dc929de6.tar.bz2
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.
Diffstat (limited to 'Misc/NEWS.d')
-rw-r--r--Misc/NEWS.d/next/C API/2019-05-22-17-33-52.bpo-37107.8BVPR-.rst4
1 files changed, 4 insertions, 0 deletions
diff --git a/Misc/NEWS.d/next/C API/2019-05-22-17-33-52.bpo-37107.8BVPR-.rst b/Misc/NEWS.d/next/C API/2019-05-22-17-33-52.bpo-37107.8BVPR-.rst
new file mode 100644
index 0000000..4a9e58f
--- /dev/null
+++ b/Misc/NEWS.d/next/C API/2019-05-22-17-33-52.bpo-37107.8BVPR-.rst
@@ -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.