[New-bugs-announce] [issue28665] Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF

Raymond Hettinger report at bugs.python.org
Fri Nov 11 07:10:41 EST 2016


New submission from Raymond Hettinger:

The STORE_FAST, LOAD_FAST, and LOAD_DEREF opcodes all use fast macros for variable access.  This patch harmonizes STORE_DEREF to follow the same pattern.

Both the C code and the generated assembly look nicer.  Gives an approx 40% speed-up (using both Clang and GCC-6) on the "store_nonlocal" portion of the variable access benchmark at http://code.activestate.com/recipes/577834
The eliminates the nonlocal speed penalty, making cell variable updates run nearly as fast as updates to locals.

----------
assignee: serhiy.storchaka
components: Interpreter Core
files: fastcell.diff
keywords: patch
messages: 280574
nosy: rhettinger, serhiy.storchaka
priority: normal
severity: normal
stage: patch review
status: open
title: Harmonize STORE_DEREF with STORE_FAST and LOAD_DEREF
type: performance
versions: Python 3.6, Python 3.7
Added file: http://bugs.python.org/file45442/fastcell.diff

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


More information about the New-bugs-announce mailing list