Jacobi/Legendre/Kronecker

Niels Möller nisse at lysator.liu.se
Thu Dec 20 11:47:17 CET 2012


bodrato at mail.dm.unipi.it writes:

> I tested some changes and I suggest the attached patch: unconditionally
> reduce modulo b.

I'm not sure. In this case, the macro expands to a function call which
basicallly does a % b. Since division usually is expensive, I think that
can be faster only if a is many bits larger than b, so we reduce the
number of iterations in mpn_jacobi_base substantially. And it's likely a
slowdown if a and be are close in bitsize.

I don't have the time to do any benchmarking right now.

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