A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2005-February/051716.html below:

[Python-Dev] Store x Load x --> DupStore

[Python-Dev] Store x Load x --> DupStore [Python-Dev] Store x Load x --> DupStoreRaymond Hettinger raymond.hettinger at verizon.net
Sun Feb 20 16:39:24 CET 2005
Any objections to new peephole transformation that merges a store/load
pair into a single step?
 
There is a tested patch at:  www.python.org/sf/1144842

It folds the two steps into a new opcode.  In the case of
store_name/load_name, it saves one three byte instruction, a trip around
the eval-loop, two stack mutations, a incref/decref pair, a dictionary
lookup, and an error check (for the lookup).  While it acts like a dup
followed by a store, it is implemented more simply as a store that
doesn't pop the stack.  The transformation is broadly applicable and
occurs thousands of times in the standard library and test suite.



Raymond Hettinger

More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4