summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2004-03-12 16:33:17 (GMT)
committerRaymond Hettinger <python@rcn.com>2004-03-12 16:33:17 (GMT)
commitfba1cfc49a7ce1b2d7e7eab93ef05c3cc81d6e1a (patch)
tree56535c85e2bc92d2e2f1d5a83c359b474171be42
parent6e058d70efb0acbcc19567f9711e14314c8f20e2 (diff)
downloadcpython-fba1cfc49a7ce1b2d7e7eab93ef05c3cc81d6e1a.zip
cpython-fba1cfc49a7ce1b2d7e7eab93ef05c3cc81d6e1a.tar.gz
cpython-fba1cfc49a7ce1b2d7e7eab93ef05c3cc81d6e1a.tar.bz2
LIST_APPEND is predicably followed by JUMP_ABSOLUTE.
Reduces loop overhead by an additional 10%.
-rw-r--r--Python/ceval.c6
1 files changed, 5 insertions, 1 deletions
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;