mpz reuse test takes too much time

Torbjörn Granlund tg at gmplib.org
Sun Nov 27 15:56:31 UTC 2016


Looks good.

Please check code spacing and . vs , in comments.

Shouldn't res1, res2, res3 be overwritten with some fixed garbage when
they are not also input operands?  Now good values could be there from a
previous operation, while the tested operation forgets to write
anything?  Please fix in gcdext code, fixing it as necessary for other
ops in reuse.c is a separate patch, I think.

I write "fixed garbage" because I think that's good enough.  Probably
zeroing out the entire allocted are will do?

  MPN_ZERO(PTR(res1),ALLOC(res1));
  SIZ(res1) = 0xDEFACE;

-- 
Torbjörn
Please encrypt, key id 0xC8601622


More information about the gmp-devel mailing list