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.22:33:51
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1641076431.25.0.994070864401.issue46218@roundup.psfhosted.org>
In-reply-to
Content
Nope, boosting the window size to 6 doesn't appear to really help at all, at least not on my box. Regardless of the window size, we have to do a bigint square for every bit position in the exponent. I don't know of any way to speed that (short of speeding multiplication, and we already make a special case of squaring).

So that dominates. Even for an exponent of a million solid 1-bits, the overall timing difference appears insignificant.

So I cut the window size back to 5 bits again. That has the benefit of cutting the old table size in half, which also cuts the precomputation time to fill it about in half, which should have some minor benefit for saner (smaller) exponents.

As a sanity check, I also tried cutting the window size to 3 bits. That had an obvious bad timing impact on huge exponents of solid 1 bits.
History
Date User Action Args
2022-01-01 22:33:51tim.peterssetrecipients: + tim.peters
2022-01-01 22:33:51tim.peterssetmessageid: <1641076431.25.0.994070864401.issue46218@roundup.psfhosted.org>
2022-01-01 22:33:51tim.peterslinkissue46218 messages
2022-01-01 22:33:51tim.peterscreate