Faster table compute in mpn_sec_powm

Torbjörn Granlund tg at
Tue Mar 20 23:04:38 UTC 2018

Bradley Lucier <lucier at> writes:

  If you're filling the entire table, I don't see how this would be
  faster.  (E.g., if B=10 and you're calculating the entries of a table
  from 1 to 10,000.)

Squaring is much faster than general multiplication.

But of one is to compute a table of powers of something small, then no,
this would be a silly algorithm.

My context is modular exponentiation, and there the base is typically
not small.

Please encrypt, key id 0xC8601622

More information about the gmp-devel mailing list