The MPFR Library: Timings with GMP 2.0.2

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 MPFMPFRMathematicaPariMagma
commercialcommercial/freefreefreecommercialfreecommercial
interactiveinteractivelibrarylibraryinteractivelibraryinteractive
100 digits Maple V.5.1 MuPAD 1.4.2 MPF MPFR 0.4 Mathematica 4.0.1 Pari 2.0.14 alpha Magma V2.6-2
multiplication 0.040.0240.00750.00770.0200.0030.018
division 0.150.0270.0100.0110.1430.0070.033
square root 0.290.0720.0240.0160.180.0320.14
exponential 1.40.47n/a0.370.940.161.1
logarithm 2.30.82n/a0.451.240.352.0
1000 digits Maple V.5.1 MuPAD 1.4.2 MPF MPFR 0.4 Mathematica 4.0.1 Pari 2.0.14 alpha Magma V2.6-2
multiplication 1.10.480.300.300.370.181.1
division 11.30.560.500.501.120.251.3
square root 15.01.50.700.351.60.703.3
exponential 5335n/a37351479
logarithm 6952n/a293123119
10000 digits Maple V.5.1 MuPAD 1.4.2 MPF MPFR 0.4 Mathematica 4.0.1 Pari 2.0.14 alpha Magma V2.6-2
multiplication 394511111517104
division 11304946214322111
square root 139016042155572362
exponential 53309690n/a4250930368022300
logarithm 566015720n/a8001240675035400

The source file of these tests is available for Maple, MuPAD, MPF, MPFR, Mathematica, Pari, and Magma. Note: the MPFR timings were obtained with the latest official release of GMP, i.e. GMP version 2.0.2.

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.0e with 640MB of main memory.

100 digits Maple V.5.1 MPF 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.0067 0.0068 0.108996 0.0065 0.0116
square root .0847 0.015 0.013 0.287655 0.028 0.0484
exponential .583 n/a 0.095 0.871632 0.17 0.4316
logarithm 1.08 n/a 0.53 0.836633 0.38 0.73
1000 digits Maple V.5.1 MPF MPFR 0.4 Mathematica 3.0 Pari 2.0.14 alpha Magma V2.6-2
multiplication .185 0.035 0.035 0.101663 0.067 0.066
division .721 0.083 0.084 0.461648 0.116 0.117
square root 1.28 0.153 0.083 0.988294 0.37 0.5
exponential 14.2 n/a 4.5 9.86627 7.44 7.17
logarithm 15.8 n/a 5.5 19.3326 12.9 13.5
10000 digits Maple V.5.1 MPF MPFR 0.4 Mathematica 3.0 Pari 2.0.14 alpha Magma V2.6-2
multiplication 7.20 1.4 1.4 7.5997 6.7 6.0
division 57.0 4.3 2.9 22.9991 7.6 6.6
square root 73.9 4.9 2.2 34.7653 26.0 21.7
exponential 1590. n/a 530. 1615.94 1600 1333
logarithm 1410. n/a 100. 7418.54 2550 2217

Back to the MPFR page.