]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Use fast_next_opcode shortcut for forward jump opcodes (it's safe and
authorNeil Schemenauer <nascheme@enme.ucalgary.ca>
Sun, 1 Jun 2003 19:21:12 +0000 (19:21 +0000)
committerNeil Schemenauer <nascheme@enme.ucalgary.ca>
Sun, 1 Jun 2003 19:21:12 +0000 (19:21 +0000)
gives a small speedup).

Python/ceval.c

index c652b07b2c3a7b41f8c5e2c865194b04410642a0..4e5b4722991c0e4374e4017765665025a802ce35 100644 (file)
@@ -2001,18 +2001,18 @@ eval_frame(PyFrameObject *f)
 
                case JUMP_FORWARD:
                        JUMPBY(oparg);
-                       continue;
+                       goto fast_next_opcode;
 
                PREDICTED_WITH_ARG(JUMP_IF_FALSE);
                case JUMP_IF_FALSE:
                        w = TOP();
                        if (w == Py_True) {
                                PREDICT(POP_TOP);
-                               continue;
+                               goto fast_next_opcode;
                        }
                        if (w == Py_False) {
                                JUMPBY(oparg);
-                               continue;
+                               goto fast_next_opcode;
                        }
                        err = PyObject_IsTrue(w);
                        if (err > 0)
@@ -2028,11 +2028,11 @@ eval_frame(PyFrameObject *f)
                        w = TOP();
                        if (w == Py_False) {
                                PREDICT(POP_TOP);
-                               continue;
+                               goto fast_next_opcode;
                        }
                        if (w == Py_True) {
                                JUMPBY(oparg);
-                               continue;
+                               goto fast_next_opcode;
                        }
                        err = PyObject_IsTrue(w);
                        if (err > 0) {