constant in python?

Alex Martelli aleaxit at yahoo.com
Sat Aug 18 19:44:28 EDT 2001


"Skip Montanaro" <skip at pobox.com> wrote in message
news:mailman.998158617.21783.python-list at python.org...
    ...
> remaining opcodes in his table, roughly 65% of them do nothing but move
data
> onto, off of, or within the stack.  I consider all the following as data
> movement opcodes: LOAD_FAST, LOAD_CONST, LOAD_NAME, LOAD_GLOBAL,
STORE_FAST,
> POP_TOP, LOAD_ATTR, STORE_NAME, and STORE_ATTR.
>
> If you want some performance boost, think about ways you might delete
about
> 90% of those instructions. ;-)

Hmmm, I'll byte -- by having joined LOAD_this_STORE_that bytecodes (5 kinds
of loads, 3 kinds of stores, that's 15 new bytecodes) and a few
call-and-poptop
ones?  And a peephole optimizer to change the bytecode stream coming from
the current compiler to one using the new bytecodes (and making a few more
minor opts while he's at it)...?

Or am I missing something obvious...?  'cause I don't think that would
delete
90% of the datamovement instructions -- maybe 30 to 40% or so...?


Alex






More information about the Python-list mailing list