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 scoder
Recipients gvanrossum, lukasz.langa, mark.dickinson, rhettinger, scoder, serhiy.storchaka, steven.daprano
Date 2021-09-21.09:38:36
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1632217116.45.0.849629749072.issue24076@roundup.psfhosted.org>
In-reply-to
Content
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.
History
Date User Action Args
2021-09-21 09:39:43scoderunlinkissue24076 messages
2021-09-21 09:38:36scodersetrecipients: + scoder, gvanrossum, rhettinger, mark.dickinson, steven.daprano, lukasz.langa, serhiy.storchaka
2021-09-21 09:38:36scodersetmessageid: <1632217116.45.0.849629749072.issue24076@roundup.psfhosted.org>
2021-09-21 09:38:36scoderlinkissue24076 messages
2021-09-21 09:38:36scodercreate