The MPFR Library: Timings for Version 0.4 with GMP 3.0

Updated for GMP 3.0, old timings with GMP 2.0.2 still available here.

32-bit machine

The following tables give the cpu time in milliseconds spent by several systems or libraries for different operations, at different precisions. These timings were obtained on a 400Mhz Xeon (alexandre.medicis.polytechnique.fr) running Linux (libraries were compiled with gcc -O2). Thanks to the Médicis center for providing a machine with all those systems installed on it.

MapleMuPADGMP MPFMPFRMathematicaPariMagmaArithmetic Explorer
commercialcommercial/freefreefreecommercialfreecommercialfree
interactiveinteractivelibrarylibraryinteractivelibraryinteractiveinteractive
directed roundingnononoyesnononoyes
100 digits Maple V.5.1 MuPAD 1.4.2 MPF 3.0 MPFR 0.4 Mathematica 4.0.1 Pari 2.0.14 alpha Magma V2.6-2 Ar. Explorer 1.00
multiplication 0.040.0240.00370.00440.0200.0030.0180.017
division 0.150.0270.0070.0090.1430.0070.0330.018
square root 0.290.0720.0170.0170.180.0320.140.10
exponential 1.40.47n/a0.230.940.161.1n/a
logarithm 2.30.82n/a0.401.240.352.0n/a
1000 digits Maple V.5.1 MuPAD 1.4.2 MPF 3.0 MPFR 0.4 Mathematica 4.0.1 Pari 2.0.14 alpha Magma V2.6-2 Ar. Explorer 1.00
multiplication 1.10.480.140.140.370.181.10.51
division 11.30.560.220.231.120.251.30.40
square root 15.01.50.340.181.60.703.31.3
exponential 5335n/a15351479n/a
logarithm 6952n/a153123119n/a
10000 digits Maple V.5.1 MuPAD 1.4.2 MPF 3.0 MPFR 0.4 Mathematica 4.0.1 Pari 2.0.14 alpha Magma V2.6-2 Ar. Explorer 1.00
multiplication 39454.74.8151710450
division 1130499.810.1432211137
square root 139016015.67.3557236288
exponential 53309690n/a1600930368022300n/a
logarithm 566015720n/a4201240675035400n/a

The source file of these tests is available for Maple, MuPAD, MPF 3.0, MPFR, Mathematica, Pari, and Magma.

64-bit machine

The following timings were obtained, with the stimulation and help of Bruno Salvy, on a 500Mhz Compaq XP/1000 (aka Alpha EV6) under OSF/1 4.0 with 640MB of main memory (leon1.medicis.polytechnique.fr).

100 digits Maple V.5.1 MPF 3.0 MPFR 0.4 Mathematica 3.0 Pari 2.0.14 alpha Magma V2.6-2
multiplication .0125 0.0010 0.0012 0.0114995 0.0012 0.0033
division .0278 0.0021 0.0029 0.108996 0.0065 0.0116
square root .0847 0.0051 0.0047 0.287655 0.028 0.0484
exponential .583 n/a 0.078 0.871632 0.17 0.4316
logarithm 1.08 n/a 0.29 0.836633 0.38 0.73
1000 digits Maple V.5.1 MPF 3.0 MPFR 0.4 Mathematica 3.0 Pari 2.0.14 alpha Magma V2.6-2
multiplication .185 0.031 0.031 0.101663 0.067 0.066
division .721 0.054 0.055 0.461648 0.116 0.117
square root 1.28 0.080 0.044 0.988294 0.37 0.5
exponential 14.2 n/a 3.6 9.86627 7.44 7.17
logarithm 15.8 n/a 3.8 19.3326 12.9 13.5
10000 digits Maple V.5.1 MPF 3.0 MPFR 0.4 Mathematica 3.0 Pari 2.0.14 alpha Magma V2.6-2
multiplication 7.20 1.1 1.1 7.5997 6.7 6.0
division 57.0 2.4 2.4 22.9991 7.6 6.6
square root 73.9 3.4 1.7 34.7653 26.0 21.7
exponential 1590. n/a 370. 1615.94 1600 1333
logarithm 1410. n/a 84. 7418.54 2550 2217

Back to the MPFR page.