]> granicus.if.org Git - python/commitdiff
compile.c always emits END_FINALLY after WITH_CLEANUP, so predict that in
authorJeffrey Yasskin <jyasskin@gmail.com>
Mon, 3 Mar 2008 01:27:03 +0000 (01:27 +0000)
committerJeffrey Yasskin <jyasskin@gmail.com>
Mon, 3 Mar 2008 01:27:03 +0000 (01:27 +0000)
ceval.c. This is worth about a .03-.04us speedup on a simple with block.

Python/ceval.c

index db9ce7dcd465e7f9647f0bb022e32c2a5fc9643d..f210c9f8877d8279abeff4229f615fc50d0f2300 100644 (file)
@@ -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;
                }