Mercurial > cpython-lru_cache-weakref
diff Python/ceval.c @ 29349:2f731c57cdc6 legacy-trunk
Use fast_next_opcode shortcut for forward jump opcodes (it's safe and
gives a small speedup).
| author | Neil Schemenauer <nascheme@enme.ucalgary.ca> |
|---|---|
| date | Sun, 01 Jun 2003 19:21:12 +0000 |
| parents | fc286e28556f |
| children | fa97293533a9 |
line wrap: on
line diff
--- a/Python/ceval.c Sun Jun 01 01:11:14 2003 +0000 +++ b/Python/ceval.c Sun Jun 01 19:21:12 2003 +0000 @@ -2001,18 +2001,18 @@ case JUMP_FORWARD: JUMPBY(oparg); - continue; + goto fast_next_opcode; PREDICTED_WITH_ARG(JUMP_IF_FALSE); case JUMP_IF_FALSE: w = TOP(); if (w == Py_True) { PREDICT(POP_TOP); - continue; + goto fast_next_opcode; } if (w == Py_False) { JUMPBY(oparg); - continue; + goto fast_next_opcode; } err = PyObject_IsTrue(w); if (err > 0) @@ -2028,11 +2028,11 @@ w = TOP(); if (w == Py_False) { PREDICT(POP_TOP); - continue; + goto fast_next_opcode; } if (w == Py_True) { JUMPBY(oparg); - continue; + goto fast_next_opcode; } err = PyObject_IsTrue(w); if (err > 0) {
