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.05:31:20
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> The patch looks fine, but it looks a bit like benchmark chasing. Is the speed of builtin sum() of a sequence of integers important enough to do this bit of inlining?

Given that we already accepted essentially separate loops for the int, float and everything else cases, I think the answer is that it doesn't add much to the triplication.

> It may break if we change the internals of Py_Long, as Mark Shannon has been wanting to do for a while

I would assume that such a structural change would come with suitable macros to unpack the special 0-2 digit integers. Those would then apply here, too. As it stands, there are already some modules distributed over the source tree that use direct digit access: ceval.c, _decimal.c, marshal.c. They are easy to find with grep and my PR just adds one more.
Date User Action Args
2021-09-21 05:31:20scodersetrecipients: + scoder, gvanrossum, rhettinger, mark.dickinson, steven.daprano, lukasz.langa, serhiy.storchaka
2021-09-21 05:31:20scodersetmessageid: <>
2021-09-21 05:31:20scoderlinkissue24076 messages
2021-09-21 05:31:20scodercreate