mpn_sqrtrem{1,2}

Marco Bodrato bodrato at mail.dm.unipi.it
Wed Mar 15 04:57:55 UTC 2017


Ciao,

Il Mar, 14 Marzo 2017 10:17 pm, Adrien Prost-Boucle ha scritto:
> I just reached 2.4x :-)

Great!

> For that, I added macros to indicate whether sqrtrem{1,2} need normalized
> input.

That's a good idea !-)

> Laptop Core 2 Duo 2GHz
> ======================

>  128 bits   time  8.43 ->  5.65 ->  5.53   speedup 1.49  -> 1.52
>   96 bits   time  9.29 ->  6.27 ->  5.10   speedup 1.48  -> 1.82
>   64 bits   time  4.65 ->  3.66 ->  2.73   speedup 1.27  -> 1.70

> PC i7-4790 3.60GHz
> ==================

>  128 bits   time  2.42 ->  1.41 ->  1.41   speedup 1.72 -> 1.72
>   96 bits   time  3.16 ->  1.89 ->  1.32   speedup 1.67 -> 2.39
>   64 bits   time  1.06 ->  0.93 ->  0.85   speedup 1.14 -> 1.25

I miss a case: 32 bits; to fully evaluate the impact of the patch+FP on
one-limb operands in the range 1..62.

Did you try also with ABI=32 (16,32,48, and 64 bits)?

> Here is the patch:

Clean and readable, thanks.
But not needed by the library :-/
... yet.

If you are ready for assembler, then let's go!

I you are not... wasn't your C-only sqrtrem1 for ABI=32 almost ready?

Best regards,
m

-- 
http://bodrato.it/papers/



More information about the gmp-devel mailing list