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.
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.04 | 0.024 | 0.0075 | 0.0077 | 0.020 | 0.003 | 0.018 |
division |
0.15 | 0.027 | 0.010 | 0.011 | 0.143 | 0.007 | 0.033 |
square root |
0.29 | 0.072 | 0.024 | 0.016 | 0.18 | 0.032 | 0.14 |
exponential |
1.4 | 0.47 | n/a | 0.37 | 0.94 | 0.16 | 1.1 |
logarithm |
2.3 | 0.82 | n/a | 0.45 | 1.24 | 0.35 | 2.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.1 | 0.48 | 0.30 | 0.30 | 0.37 | 0.18 | 1.1 |
division |
11.3 | 0.56 | 0.50 | 0.50 | 1.12 | 0.25 | 1.3 |
square root |
15.0 | 1.5 | 0.70 | 0.35 | 1.6 | 0.70 | 3.3 |
exponential |
53 | 35 | n/a | 37 | 35 | 14 | 79 |
logarithm |
69 | 52 | n/a | 29 | 31 | 23 | 119 |
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 |
39 | 45 | 11 | 11 | 15 | 17 | 104 |
division |
1130 | 49 | 46 | 21 | 43 | 22 | 111 |
square root |
1390 | 160 | 42 | 15 | 55 | 72 | 362 |
exponential |
5330 | 9690 | n/a | 4250 | 930 | 3680 | 22300 |
logarithm |
5660 | 15720 | n/a | 800 | 1240 | 6750 | 35400 |
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.