Message242310
| Author | scoder |
|---|---|
| Recipients | lukasz.langa, mark.dickinson, pitrou, rhettinger, scoder, serhiy.storchaka |
| Date | 2015-05-01.14:02:20 |
| SpamBayes Score | -1.0 |
| Marked as misclassified | Yes |
| Message-id | <1430488941.32.0.124414957859.issue24076@psf.upfronthosting.co.za> |
| In-reply-to |
| Content | |
|---|---|
I tried implementing a freelist. Patch attached, mostly adapted from the one in dictobject.c, but certainly needs a bit of cleanup. The results are not bad, about 10-20% faster: 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-01 14:02:21 | scoder | set | recipients: + scoder, rhettinger, mark.dickinson, pitrou, lukasz.langa, serhiy.storchaka |
| 2015-05-01 14:02:21 | scoder | set | messageid: <1430488941.32.0.124414957859.issue24076@psf.upfronthosting.co.za> |
| 2015-05-01 14:02:21 | scoder | link | issue24076 messages |
| 2015-05-01 14:02:20 | scoder | create | |