From fba1cfc49a7ce1b2d7e7eab93ef05c3cc81d6e1a Mon Sep 17 00:00:00 2001 From: Raymond Hettinger Date: Fri, 12 Mar 2004 16:33:17 +0000 Subject: LIST_APPEND is predicably followed by JUMP_ABSOLUTE. Reduces loop overhead by an additional 10%. --- Python/ceval.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/Python/ceval.c b/Python/ceval.c index 71fd547..d3a0053 100644 --- a/Python/ceval.c +++ b/Python/ceval.c @@ -1231,7 +1231,10 @@ eval_frame(PyFrameObject *f) err = PyList_Append(v, w); Py_DECREF(v); Py_DECREF(w); - if (err == 0) continue; + if (err == 0) { + PREDICT(JUMP_ABSOLUTE); + continue; + } break; case INPLACE_POWER: @@ -2061,6 +2064,7 @@ eval_frame(PyFrameObject *f) break; continue; + PREDICTED_WITH_ARG(JUMP_ABSOLUTE); case JUMP_ABSOLUTE: JUMPTO(oparg); continue; -- cgit v0.12