remove extra division in mpq/aors.c
tg at gmplib.org
Tue Mar 1 18:18:24 CET 2011
Marc Glisse <marc.glisse at inria.fr> writes:
Just to make my earlier remarks more constructive, 2 versions of what
I was suggesting are attached.
The scalar division by dl isn't good, it is a very slow operation (think
~70 cycles on a modern CPU). It might look cumbersome to test for 3 and
5 separately, but since the divisors come from gcd, these will be very
common cases, and 3 will be considerably mode common than 5.
I'll follow some of your suggestions, though.
More information about the gmp-discuss