Kaydet (Commit) fba1cfc4 authored tarafından Raymond Hettinger's avatar Raymond Hettinger

LIST_APPEND is predicably followed by JUMP_ABSOLUTE.

Reduces loop overhead by an additional 10%.
üst 6e058d70
...@@ -1231,7 +1231,10 @@ eval_frame(PyFrameObject *f) ...@@ -1231,7 +1231,10 @@ eval_frame(PyFrameObject *f)
err = PyList_Append(v, w); err = PyList_Append(v, w);
Py_DECREF(v); Py_DECREF(v);
Py_DECREF(w); Py_DECREF(w);
if (err == 0) continue; if (err == 0) {
PREDICT(JUMP_ABSOLUTE);
continue;
}
break; break;
case INPLACE_POWER: case INPLACE_POWER:
...@@ -2061,6 +2064,7 @@ eval_frame(PyFrameObject *f) ...@@ -2061,6 +2064,7 @@ eval_frame(PyFrameObject *f)
break; break;
continue; continue;
PREDICTED_WITH_ARG(JUMP_ABSOLUTE);
case JUMP_ABSOLUTE: case JUMP_ABSOLUTE:
JUMPTO(oparg); JUMPTO(oparg);
continue; continue;
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment