Message402301
Original:
$ ./python -m timeit -s 'd = list(range(2**61, 2**61 + 10000))' 'sum(d)'
500 loops, best of 5: 712 usec per loop
$ ./python -m timeit -s 'd = list(range(2**30, 2**30 + 10000))' 'sum(d)'
2000 loops, best of 5: 149 usec per loop
$ ./python -m timeit -s 'd = list(range(2**29, 2**29 + 10000))' 'sum(d)'
2000 loops, best of 5: 107 usec per loop
$ ./python -m timeit -s 'd = list(range(10000))' 'sum(d)'
2000 loops, best of 5: 107 usec per loop
New:
stefan@flup:~/ablage/software/Python/python-git$ ./python -m timeit -s 'd = list(range(2**61, 2**61 + 10000))' 'sum(d)'
500 loops, best of 5: 713 usec per loop
$ ./python -m timeit -s 'd = list(range(2**30, 2**30 + 10000))' 'sum(d)'
2000 loops, best of 5: 148 usec per loop
$ ./python -m timeit -s 'd = list(range(2**29, 2**29 + 10000))' 'sum(d)'
5000 loops, best of 5: 77.4 usec per loop
$ ./python -m timeit -s 'd = list(range(10000))' 'sum(d)'
5000 loops, best of 5: 77.2 usec per loop
Seems to be 28% faster for the single digit case and exactly as fast as before with larger integers.
Note that these are not PGO builds. |
|
Date |
User |
Action |
Args |
2021-09-21 09:39:43 | scoder | unlink | issue24076 messages |
2021-09-21 09:38:36 | scoder | set | recipients:
+ scoder, gvanrossum, rhettinger, mark.dickinson, steven.daprano, lukasz.langa, serhiy.storchaka |
2021-09-21 09:38:36 | scoder | set | messageid: <1632217116.45.0.849629749072.issue24076@roundup.psfhosted.org> |
2021-09-21 09:38:36 | scoder | link | issue24076 messages |
2021-09-21 09:38:36 | scoder | create | |
|