[issue2268] Fold slice constants

2010-08-21 Thread Raymond Hettinger
Raymond Hettinger added the comment: The was a nice attempt at a peephole optimization. I'm rejecting it because: * too many other things need to be changed to support it * the measured win is somewhat small * we have a negative bias towards expanding the peephole optimizer * the AST may be a b

[issue2268] Fold slice constants

2010-08-21 Thread Guido van Rossum
Changes by Guido van Rossum : -- nosy: -gvanrossum ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mail.

[issue2268] Fold slice constants

2010-08-21 Thread Georg Brandl
Changes by Georg Brandl : -- versions: +Python 3.2 -Python 3.0 ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: h

[issue2268] Fold slice constants

2010-08-21 Thread Georg Brandl
Changes by Georg Brandl : -- assignee: -> rhettinger ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: http://mai

[issue2268] Fold slice constants

2008-03-26 Thread Alexander Belopolsky
Alexander Belopolsky <[EMAIL PROTECTED]> added the comment: Just to quantify the improvement: Before: $ ./python -m timeit -s"x='abc'" "x[::-1]" 100 loops, best of 3: 0.305 usec per loop $ ./python -O -m timeit -s"x='abc'" "x[::-1]" 100 loops, best of 3: 0.275 usec per loop After: $ .

[issue2268] Fold slice constants

2008-03-10 Thread Jean-Paul Calderone
Changes by Jean-Paul Calderone <[EMAIL PROTECTED]>: -- nosy: -exarkun __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsu

[issue2268] Fold slice constants

2008-03-10 Thread Alexander Belopolsky
New submission from Alexander Belopolsky <[EMAIL PROTECTED]>: I am attaching a proof-of-concept patch which would optimize bytecode generated from constant slices as follows: Before patch: >>> dis(lambda:x[1:2:3]) 1 0 LOAD_GLOBAL 0 (x) 3 LOAD_CONST