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 | gregory.p.smith, pitrou |
| Date | 2008年03月26日.02:09:46 |
| SpamBayes Score | 0.11804416 |
| Marked as misclassified | No |
| Message-id | <1206497392.57.0.156258590526.issue2459@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
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: 100000 loops, best of 3: 14.9 usec per loop After: 100000 loops, best of 3: 12.5 usec per loop ./python -m timeit -s "l = range(100)" "[x for x in l if x]" Before: 10000 loops, best of 3: 24.1 usec per loop After: 100000 loops, best of 3: 18.8 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.5 usec per loop After: 100000 loops, best of 3: 11.9 usec per loop Please note that this patch is orthogonal with Neal's patch in #2183, so the two combined should be quite interesting for the list comprehensions bytecode. |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2008年03月26日 02:09:53 | pitrou | set | spambayes_score: 0.118044 -> 0.11804416 recipients: + pitrou, gregory.p.smith |
| 2008年03月26日 02:09:52 | pitrou | set | spambayes_score: 0.118044 -> 0.118044 messageid: <1206497392.57.0.156258590526.issue2459@psf.upfronthosting.co.za> |
| 2008年03月26日 02:09:51 | pitrou | link | issue2459 messages |
| 2008年03月26日 02:09:51 | pitrou | create | |