speed of unbalanced multiplication

Niels Möller nisse at lysator.liu.se
Thu Feb 7 10:29:36 CET 2013


bodrato at mail.dm.unipi.it writes:

> After the patch, only changing the way tune/speed allocate memory for the
> operands, their results are comparable:

I don't understand the details, like the align parameter to the
allocation macros.

> If other developers does not dislike the changed meaning of the .<r>
> parameter to mpn_mul, this patch can be applied to the main repo...

Makes sense to me to have the r parameter give the size of the smaller
operand. Are there any drawbacks?

But if we change the meaning of r, maybe it would make sense to
interpret it as follows:

  if r <= size, it's the size of the smaller operand (what your change
  does).

  if r > size, its the size of the *product*, so do size limbs by (r -
  size) limbs.

That would make it a bit more convenient to measure how smooth the
performance is for unbalanced multiplications.

Regards,
/Niels

-- 
Niels Möller. PGP-encrypted email is preferred. Keyid C0B98E26.
Internet email is subject to wholesale government surveillance.


More information about the gmp-devel mailing list