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 tim.peters
Recipients tim.peters
Date 2022-01-01.01:46:39
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1641001599.99.0.180996324134.issue46218@roundup.psfhosted.org>
In-reply-to
Content
As discussed on python-dev, it would be nice to break long_pow()'s reliance on that the number of bits in a CPython long "digit" is a multiple of 5.

Moving to the sliding-window algorithm would do that (it has to be able to cross digit boundaries to fill the current window), and would be better on some other counts too: the precomputed table can be half the size (or we can add an extra bit to the window for the same table size), and it can - depending on exponent bit patterns - sometimes reduce the number of multiplies needed too.

So I intend to do that, and bump the window size from 5 to 6 (which would yield a significant, although modest, speed improvement for giant-exponent cases).
History
Date User Action Args
2022-01-01 01:46:40tim.peterssetrecipients: + tim.peters
2022-01-01 01:46:39tim.peterssetmessageid: <1641001599.99.0.180996324134.issue46218@roundup.psfhosted.org>
2022-01-01 01:46:39tim.peterslinkissue46218 messages
2022-01-01 01:46:39tim.peterscreate