[issue27097] ceval: Wordcode follow up, explicit unsigned short read

Demur Rumed report at bugs.python.org
Mon May 23 20:08:19 EDT 2016


New submission from Demur Rumed:

Attached is a patch based off #26647 which converts ceval to read opcode/oparg by casting next_instr to an unsigned short. I don't believe we need to complicate the code with checking the pointer alignment of the instruction stream; some effort must be gone through to generate bytecode off alignment, & if the issue comes up it's because someone's using the C API on a CPU that doesn't support unaligned reads to generate their own custom bytecode. Anyways pybench went from 16.5 on wordcode to 16.0 for me

The change works through replacing NEXTOP/NEXTARG with a NEXTOPARG macro

----------
components: Interpreter Core
files: ushort.patch
keywords: patch
messages: 266209
nosy: Demur Rumed
priority: normal
severity: normal
status: open
title: ceval: Wordcode follow up, explicit unsigned short read
type: performance
versions: Python 3.6
Added file: http://bugs.python.org/file42961/ushort.patch

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue27097>
_______________________________________


More information about the Python-bugs-list mailing list