Message64603
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-benchmarks:
./python -m timeit "for x in xrange(10000): pass"
Before: 1000 loops, best of 3: 758 usec per loop
After: 1000 loops, best of 3: 483 usec per loop
./python -m timeit "x=100" "while x: x -= 1"
Before: 10000 loops, best of 3: 21.8 usec per loop
After: 10000 loops, best of 3: 21.6 usec per loop
./python -m timeit -s "l = range(100)" "[x for x in l]"
Before: 100000 loops, best of 3: 14.9 usec per loop
After: 100000 loops, best of 3: 13.3 usec per loop
./python -m timeit -s "l = range(100)" "[x for x in l if x]"
Before: 10000 loops, best of 3: 23.9 usec per loop
After: 10000 loops, best of 3: 22.3 usec per loop
./python -m timeit -s "l = range(100)" "[x for x in l if not x]"
Before: 100000 loops, best of 3: 15.8 usec per loop
After: 100000 loops, best of 3: 13.9 usec per loop
./python Tools/pybench/pybench.py -t IfThenElse
Before: 164ms per round
After: 166ms per round |
|
| Date |
User |
Action |
Args |
| 2008-03-27 16:56:15 | pitrou | set | spambayes_score: 0.304442 -> 0.3044418 recipients:
+ pitrou, nnorwitz, arigo, gregory.p.smith, phsilva |
| 2008-03-27 16:56:15 | pitrou | set | spambayes_score: 0.304442 -> 0.304442 messageid: <[email protected]> |
| 2008-03-27 16:56:14 | pitrou | link | issue2459 messages |
| 2008-03-27 16:56:14 | pitrou | create | |
|