summaryrefslogtreecommitdiff
path: root/Python/codecs.c
diff options
context:
space:
mode:
authorRaymond Hettinger <python@rcn.com>2003-03-16 03:11:04 +0000
committerRaymond Hettinger <python@rcn.com>2003-03-16 03:11:04 +0000
commitf606f87b31186e7614cbae8e5b8ef05700f6267e (patch)
tree66c3ae468afb4b6ae4684a904d01d9a332a825b8 /Python/codecs.c
parent0070f007f4b30a31e7f59ec798ae6f555bcb0c08 (diff)
downloadcpython-git-f606f87b31186e7614cbae8e5b8ef05700f6267e.tar.gz
Introduced macros for a simple opcode prediction protocol.
Applied to common cases: COMPARE_OP is often followed by a JUMP_IF. JUMP_IF is usually followed by POP_TOP. Shows improved timings on PyStone, PyBench, and specific tests using timeit.py: python timeit.py -s "x=1" "if x==1: pass" python timeit.py -s "x=1" "if x==2: pass" python timeit.py -s "x=1" "if x: pass" python timeit.py -s "x=100" "while x!=1: x-=1" Potential future candidates: GET_ITER predicts FOR_ITER FOR_ITER predicts STORE_FAST or UNPACK_SEQUENCE Also, applied missing goto fast_next_opcode to DUP_TOPX.
Diffstat (limited to 'Python/codecs.c')
0 files changed, 0 insertions, 0 deletions