Tim Peters <t...@python.org> added the comment:

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.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue46218>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to