From: Jeffrey Yasskin Date: Mon, 3 Mar 2008 01:27:03 +0000 (+0000) Subject: compile.c always emits END_FINALLY after WITH_CLEANUP, so predict that in X-Git-Tag: v2.6a2~422 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=9063a9904293fc8a37131e495362e89e3d2314a2;p=python 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. --- diff --git a/Python/ceval.c b/Python/ceval.c index db9ce7dcd4..f210c9f887 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1694,6 +1694,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) } continue; + PREDICTED(END_FINALLY); case END_FINALLY: v = POP(); if (PyInt_Check(v)) { @@ -2302,6 +2303,7 @@ PyEval_EvalFrameEx(PyFrameObject *f, int throwflag) x = POP(); Py_DECREF(x); } + PREDICT(END_FINALLY); break; }