New submission from Alex <alex.gay...@gmail.com>:

Basically whenever you have a LOAD_CONST opcode, follwed by a LOAD_ATTR
you can replace both with a single LOAD_CONST.  This optimizes things
like ", ".join or "{} {}".format (in my totally unscientific byte code
hackery it's about a 30% speedup on the loading the function).  This can
be done in the peephole optimizer.

I'll try to work up a patch.

----------
components: Interpreter Core
messages: 88455
nosy: alex
severity: normal
status: open
title: LOAD_CONST followed by LOAD_ATTR can be optimized to just be a LOAD_COST

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue6133>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to