]> granicus.if.org Git - python/commitdiff
bpo-38310: Predict BUILD_MAP_UNPACK_WITH_CALL -> CALL_FUNCTION_EX. (GH-16467)
authorBrandt Bucher <brandtbucher@gmail.com>
Sun, 29 Sep 2019 00:12:49 +0000 (17:12 -0700)
committerRaymond Hettinger <rhettinger@users.noreply.github.com>
Sun, 29 Sep 2019 00:12:49 +0000 (17:12 -0700)
Misc/NEWS.d/next/Core and Builtins/2019-09-28-22-54-25.bpo-38310.YDTbEo.rst [new file with mode: 0644]
Python/ceval.c

diff --git a/Misc/NEWS.d/next/Core and Builtins/2019-09-28-22-54-25.bpo-38310.YDTbEo.rst b/Misc/NEWS.d/next/Core and Builtins/2019-09-28-22-54-25.bpo-38310.YDTbEo.rst
new file mode 100644 (file)
index 0000000..5c3086b
--- /dev/null
@@ -0,0 +1 @@
+Predict ``BUILD_MAP_UNPACK_WITH_CALL`` -> ``CALL_FUNCTION_EX`` opcode pairs in the main interpreter loop. Patch by Brandt Bucher.
\ No newline at end of file
index 964ce1333694e23533aff1b79e77e35d5c77a5b2..a7d2ea80069a06d144644fc882cd23511ce98f67 100644 (file)
@@ -2943,6 +2943,7 @@ main_loop:
             while (oparg--)
                 Py_DECREF(POP());
             PUSH(sum);
+            PREDICT(CALL_FUNCTION_EX);
             DISPATCH();
         }
 
@@ -3522,6 +3523,7 @@ main_loop:
         }
 
         case TARGET(CALL_FUNCTION_EX): {
+            PREDICTED(CALL_FUNCTION_EX);
             PyObject *func, *callargs, *kwargs = NULL, *result;
             if (oparg & 0x01) {
                 kwargs = POP();