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

Reply via email to