Kaydet (Commit) 9063a990 authored tarafından Jeffrey Yasskin's avatar Jeffrey Yasskin

compile.c always emits END_FINALLY after WITH_CLEANUP, so predict that in

ceval.c. This is worth about a .03-.04us speedup on a simple with block.
üst 56c4debe
...@@ -1694,6 +1694,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) ...@@ -1694,6 +1694,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
} }
continue; continue;
PREDICTED(END_FINALLY);
case END_FINALLY: case END_FINALLY:
v = POP(); v = POP();
if (PyInt_Check(v)) { if (PyInt_Check(v)) {
...@@ -2302,6 +2303,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) ...@@ -2302,6 +2303,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag)
x = POP(); x = POP();
Py_DECREF(x); Py_DECREF(x);
} }
PREDICT(END_FINALLY);
break; break;
} }
......
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