Re:Sliding right into disaster: Left-to-right sliding window...
by dfox on Monday July 03, 2017 @06:28AM
(#14687230)
Straightforward implementation involves taking exponent bits from the MSB on and multiplicating by the base for 1 bits and then squaring the intermediate result.
Straightforward way to make this constant time is to do the multiplication always and discard the result for 0 bits.
Motivation of the sliding window algoritms is that they are faster and also believed to be "more constant time" than the straightforward square and multiply.
Straightforward way to make this constant time is to do the multiplication always and discard the result for 0 bits.
Motivation of the sliding window algoritms is that they are faster and also believed to be "more constant time" than the straightforward square and multiply.