mirror of
https://github.com/python/cpython.git
synced 2025-07-28 13:44:43 +00:00
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.
This commit is contained in:
parent
56c4debe0d
commit
9063a99042
1 changed files with 2 additions and 0 deletions
|
@ -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;
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue