broot vs brootinv performancs

Torbjorn Granlund tg at gmplib.org
Wed Oct 31 14:15:33 CET 2012


nisse at lysator.liu.se (Niels Möller) writes:

  I've checked in the benchmarking code now, in case anybody else want to
  try it out. I also added some testcases for brootinv.
  
Great, thanks!

  Torbjörn, would you object to converting brootinv to take a limb count
  rather than a bitcount input? I'm pretty sure specifying a count in bits
  is useful only when the caller needs less than a full limb of precision,
  and if the need arises we can write a brootinv_1 function to handle
  that.
  
Feel free.  Please fix the caller too (i.e. mpn/generic/perfpow.c).

It would be nice if you checked for speed regressions of
mpn_perfect_power_p/mpz_perfect_power_p for small arguments (which do
not get handled in the factoring).

  Next, I'd like to try optimizing brootinv, both small operands (with
  special code for the iterations when the precision is less than one
  limb, and possibly also for expanding from one to two limbs), using
  cancellation for all sizes, and wraparound for large sizes.
  
That would be great!

-- 
Torbjörn


More information about the gmp-devel mailing list