I was just wondering if a bytecode for a superinstruction of the common
sequence:

6 POP_TOP
7 LOAD_CONST 0 (None)
10 RETURN_VALUE

might be worth it.

[Collin Winter]
I doubt it. You'd save a bit of stack manipulation, but since this
will only appear at the end of a function, I'd be skeptical that this
would make any macrobenchmarks (statistically) significantly faster.

I concur with Collin.  And since it appears only at the end of a function,
the optimization doesn't help inner-loops in a function (where most of
the time usually spent).


Raymond

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to