[issue2459] speedup loops with better bytecode

2008-04-21 Thread Jesús Cea Avión
Changes by Jesús Cea Avión <[EMAIL PROTECTED]>: -- nosy: +jcea __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe:

[issue2459] speedup loops with better bytecode

2008-03-27 Thread Jeffrey Yasskin
Changes by Jeffrey Yasskin <[EMAIL PROTECTED]>: -- nosy: +jyasskin __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscr

[issue2459] speedup loops with better bytecode

2008-03-27 Thread Lauro Moura
Changes by Lauro Moura <[EMAIL PROTECTED]>: -- nosy: +lauromoura __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscrib

[issue2459] speedup loops with better bytecode

2008-03-27 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Armin, your patch gives a speed-up for "for" loops and comprehensions, although a bit less. Also, it doesn't speed up "while" loops and "if" statements at all. For some reasons it also appears to make pystone a bit slower. Here are some micro-

[issue2459] speedup loops with better bytecode

2008-03-27 Thread Armin Rigo
Armin Rigo <[EMAIL PROTECTED]> added the comment: Can you see if this simpler patch also gives speed-ups? (predict_loop.diff) -- nosy: +arigo Added file: http://bugs.python.org/file9877/predict_loop.diff __ Tracker <[EMAIL PROTECTED]>

[issue2459] speedup loops with better bytecode

2008-03-27 Thread P. Henrique Silva
Changes by P. Henrique Silva <[EMAIL PROTECTED]>: -- nosy: +phsilva __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubsc

[issue2459] speedup loops with better bytecode

2008-03-26 Thread Neal Norwitz
Neal Norwitz <[EMAIL PROTECTED]> added the comment: Antoine, I hope to look at this patch eventually. Unfortunately, there are too many build/test problems that need to be resolved before the next release. If you can help out with those, I will be able to review this patch sooner. -- n

[issue2459] speedup loops with better bytecode

2008-03-26 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Ok, the fix for the bizarre failures was really simple. Now the only failing tests are in test_trace (because it makes assumptions regarding the bytecode that aren't true anymore, I'll have to adapt the tests). Added file: http://bugs.python.

[issue2459] speedup loops with better bytecode

2008-03-26 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: This new patch completes the bytecode modifications. For/while loops as well as list comprehensions and generator expressions are a bit faster now. Also, as a side effect I've introduced a speed improvement for "if" statements and expressions.

[issue2459] speedup loops with better bytecode

2008-03-25 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: This new patch also updates the code generation for list comprehensions. Here are some micro-benchmarks: ./python -m timeit -s "l = range(100)" "[x for x in l]" Before: 10 loops, best of 3: 14.9 usec per loop After: 10 loops, best of

[issue2459] speedup loops with better bytecode

2008-03-25 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: By the way, the compiler package fix has been isolated and cleaned up as part of #2472. Maybe it would be nice to start with that one. __ Tracker <[EMAIL PROTECTED]> _

[issue2459] speedup loops with better bytecode

2008-03-25 Thread Fred L. Drake, Jr.
Changes by Fred L. Drake, Jr. <[EMAIL PROTECTED]>: __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue2459] speedup loops with better bytecode

2008-03-25 Thread Fred L. Drake, Jr.
Changes by Fred L. Drake, Jr. <[EMAIL PROTECTED]>: __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list Unsubscribe: http://mail.python.

[issue2459] speedup loops with better bytecode

2008-03-25 Thread Gregory P. Smith
Changes by Gregory P. Smith <[EMAIL PROTECTED]>: -- nosy: +gregory.p.smith __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mailing list

[issue2459] speedup loops with better bytecode

2008-03-23 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: loops4.patch adds a mechanism to avoid blocking signal catching in empty loops (such as "for x in it: pass" or "while x: pass"). Much of the speedup is still retained. ./python -m timeit "for x in xrange(1): pass" Before: 1000 loops, best

[issue2459] speedup loops with better bytecode

2008-03-23 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9822/loops2.patch __ Tracker <[EMAIL PROTECTED]> __ ___ Python-b

[issue2459] speedup loops with better bytecode

2008-03-23 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: This new patch should be ok. The block ordering algorithm in compiler.pyassem looks entirely clean now, to the extent that the previous "fixup" hacks have been disabled. Attaching loops3.py. Added file: http://bugs.python.org/file9829/loops3

[issue2459] speedup loops with better bytecode

2008-03-23 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Removed latest patch, it was half-baked. __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bugs-list mai

[issue2459] speedup loops with better bytecode

2008-03-23 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9827/loops3.patch __ Tracker <[EMAIL PROTECTED]> __ ___ Python-b

[issue2459] speedup loops with better bytecode

2008-03-23 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: This new patch includes surgery to the compiler package (especially flowgraph trickery) in order to make it work with the new opcodes. I think my changes are sane but since the package seems basically untested, unmaintained and almost unused,

[issue2459] speedup loops with better bytecode

2008-03-22 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: Removed file: http://bugs.python.org/file9820/loops.patch __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bu

[issue2459] speedup loops with better bytecode

2008-03-22 Thread Antoine Pitrou
Changes by Antoine Pitrou <[EMAIL PROTECTED]>: Added file: http://bugs.python.org/file9822/loops2.patch __ Tracker <[EMAIL PROTECTED]> __ ___ Python-bug

[issue2459] speedup loops with better bytecode

2008-03-22 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: Sorry for the double post, the second message contains fixed benchmark numbers. __ Tracker <[EMAIL PROTECTED]> __ _

[issue2459] speedup loops with better bytecode

2008-03-22 Thread Antoine Pitrou
Antoine Pitrou <[EMAIL PROTECTED]> added the comment: This is a preliminary patch to speedup for and while loops (it will also be able to speedup list comps and gen comps, if I get to do it). The patch works by putting the loop condition test at the end of loop, which allows removing one JUMP_ABS

[issue2459] speedup loops with better bytecode

2008-03-22 Thread Antoine Pitrou
New submission from Antoine Pitrou <[EMAIL PROTECTED]>: This is a preliminary patch to speedup for and while loops (it will also be able to speedup list comps and gen comps, if I get to do it). The patch works by putting the loop condition test at the end of loop, which allows removing one JUMP_A