Organization of multiplication functions

Torbjorn Granlund tege at swox.com
Fri Sep 19 15:52:06 CEST 2003


Mark Sofroniou <marks at wolfram.com> writes:

  Shouldn't it be mpn_mul_n that calls mpn_sqr_n rather than
  mpn_mul?
  
The thinking behind the current design is that mpn callers
usually know if they are squaring and can short-circuit this
themselves.

For small operations, this cuts down overhead.

  I hadn't realised before now that calling mpn_mul_n did not
  use squaring.

Now you know!

-- 
Torbjörn


More information about the gmp-devel mailing list