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 <rep...@bugs.python.org>
<http://bugs.python.org/issue27097>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to