Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit c4b570f

Browse files
committed
Use fast_next_opcode shortcut for forward jump opcodes (it's safe and
gives a small speedup).
1 parent 5ddef75 commit c4b570f

1 file changed

Lines changed: 5 additions & 5 deletions

File tree

Python/ceval.c

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2001,18 +2001,18 @@ eval_frame(PyFrameObject *f)
20012001

20022002
case JUMP_FORWARD:
20032003
JUMPBY(oparg);
2004-
continue;
2004+
goto fast_next_opcode;
20052005

20062006
PREDICTED_WITH_ARG(JUMP_IF_FALSE);
20072007
case JUMP_IF_FALSE:
20082008
w = TOP();
20092009
if (w == Py_True) {
20102010
PREDICT(POP_TOP);
2011-
continue;
2011+
goto fast_next_opcode;
20122012
}
20132013
if (w == Py_False) {
20142014
JUMPBY(oparg);
2015-
continue;
2015+
goto fast_next_opcode;
20162016
}
20172017
err = PyObject_IsTrue(w);
20182018
if (err > 0)
@@ -2028,11 +2028,11 @@ eval_frame(PyFrameObject *f)
20282028
w = TOP();
20292029
if (w == Py_False) {
20302030
PREDICT(POP_TOP);
2031-
continue;
2031+
goto fast_next_opcode;
20322032
}
20332033
if (w == Py_True) {
20342034
JUMPBY(oparg);
2035-
continue;
2035+
goto fast_next_opcode;
20362036
}
20372037
err = PyObject_IsTrue(w);
20382038
if (err > 0) {

0 commit comments

Comments
 (0)