Kaydet (Commit) c4b570f2 authored tarafından Neil Schemenauer's avatar Neil Schemenauer

Use fast_next_opcode shortcut for forward jump opcodes (it's safe and

gives a small speedup).
üst 5ddef75f
......@@ -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) {
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment