speed of mpn_sqrtrem vs mpn_rootrem

paul zimmermann Paul.Zimmermann at inria.fr
Fri Jul 31 07:05:38 UTC 2015


       Ciao Marco,

> Date: Thu, 30 Jul 2015 17:21:40 +0200
> From: "Marco Bodrato" <bodrato at mail.dm.unipi.it>
> 
> Ciao Paul,
> 
> Il Mer, 22 Gennaio 2014 1:00 pm, Zimmermann Paul ha scritto:
> > tarte% ./speed -s 1000,3000,10000 -r mpn_sqrtrem mpn_rootrem.2
> > overhead 0.000000002 secs, precision 10000 units of 3.53e-10 secs,
> > CPU freq 2833.00 MHz
> >           mpn_sqrtrem mpn_rootrem.2
> > 1000      0.000153504       #0.9454
> > 3000      0.000816813       #0.9187
> > 10000     0.004606970       #0.9623
> 
> There are some more experiment that we can try, but the anomaly you
> spotted should be healed now:
> $ tune/speed -s 1000,3000,10000 -r mpn_sqrt mpn_root.2 mpn_sqrtrem
> mpn_rootrem.2
> overhead 0.000000002 secs, precision 10000 units of 2.86e-10 secs, CPU
> freq 3500.08 MHz
>              mpn_sqrt    mpn_root.2   mpn_sqrtrem mpn_rootrem.2
> 1000     #0.000051516        1.3866        1.4643        2.1827
> 3000     #0.000295437        1.3168        1.3855        1.8478
> 10000    #0.001850352        1.2448        1.3149        1.7012
> 
> You are welcome to test and/or give further suggestions
> 
> Best regards,
> m

good to see GMP is improving! I confirm the above on my machine with the latest
and greatest development version:

zimmerma at tarte:/tmp/gmp/tune$ ./speed -s 1000,3000,10000 -r mpn_sqrt mpn_root.2 mpn_sqrtrem mpn_rootrem.2
overhead 0.000000002 secs, precision 10000 units of 3.53e-10 secs, CPU freq 2833.00 MHz
             mpn_sqrt    mpn_root.2   mpn_sqrtrem mpn_rootrem.2
1000     #0.000102105        1.3736        1.4498        2.1121
3000     #0.000578114        1.2680        1.3615        1.7848
10000    #0.003425173        1.2228        1.2868        1.6352

Best regards,
Paul


More information about the gmp-devel mailing list