This issue tracker has been migrated to GitHub ,
and is currently read-only.
For more information,
see the GitHub FAQs in the Python's Developer Guide.
| Author | pitrou |
|---|---|
| Recipients | arigo, gregory.p.smith, nnorwitz, phsilva, pitrou |
| Date | 2008年03月27日.16:56:14 |
| SpamBayes Score | 0.3044418 |
| Marked as misclassified | No |
| Message-id | <1206636975.34.0.33695206205.issue2459@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
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 |
|
| History | |||
|---|---|---|---|
| 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: <1206636975.34.0.33695206205.issue2459@psf.upfronthosting.co.za> |
| 2008年03月27日 16:56:14 | pitrou | link | issue2459 messages |
| 2008年03月27日 16:56:14 | pitrou | create | |