Message242913
| Author | scoder |
|---|---|
| Recipients | BreamoreBoy, brett.cannon, ethan.furman, larry, lemburg, mark.dickinson, pitrou, rhettinger, scoder, serhiy.storchaka |
| Date | 2015-05-11.20:06:25 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1431374785.33.0.926833556173.issue24165@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
Well, as I've shown in issue 24076 (I'm copying the numbers here), even simple arithmetic expressions can benefit from a free-list. Basically anything that uses temporary integer results. Original: $ ./python -m timeit 'sum(range(1, 100000))' 1000 loops, best of 3: 1.86 msec per loop $ ./python -m timeit -s 'l = list(range(1000, 10000))' '[(i*2+5) // 7 for i in l]' 1000 loops, best of 3: 1.05 msec per loop With freelist: $ ./python -m timeit 'sum(range(1, 100000))' 1000 loops, best of 3: 1.52 msec per loop $ ./python -m timeit -s 'l = list(range(1000, 10000))' '[(i*2+5) // 7 for i in l]' 1000 loops, best of 3: 931 usec per loop |
|
| History | |||
|---|---|---|---|
| Date | User | Action | Args |
| 2015-05-11 20:06:25 | scoder | set | recipients: + scoder, lemburg, brett.cannon, rhettinger, mark.dickinson, pitrou, larry, BreamoreBoy, ethan.furman, serhiy.storchaka |
| 2015-05-11 20:06:25 | scoder | set | messageid: <1431374785.33.0.926833556173.issue24165@psf.upfronthosting.co.za> |
| 2015-05-11 20:06:25 | scoder | link | issue24165 messages |
| 2015-05-11 20:06:25 | scoder | create | |