Timings for integer arithmetic
NOTE: this page refers to the stable version
2.3.0 of the PARI/GP system [ bench
source code ], with
native kernel and GMP kernel respectively. PARI and GMP-4-1-4 were linked
statically to the bench program.
The following tables give the cpu time in milliseconds spent by the PARI
kernels for different operations, at different digitsizes. For everything but
divisions, a test for N digits means two operands with
N decimal digits. For divisions, the dividend has 2N decimal
digits, and the divisor N decimal digits.
Thanks to the Médicis
center for providing the benchmark machines.
32-bit machine: laurent5.medicis.polytechnique.fr.
These timings were obtained on a bi-athlon MP 2200+ 1800Mhz 2 Gb
running Linux (libraries were compiled with gcc 3.2 20020903 with their native
flags).
100 digits |
Pari-2-3-0 |
Pari-2-3-0-gmp |
addii |
0.00011 |
0.000053 |
mulii |
0.00096 |
0.00040 |
diviiexact |
0.0012 |
0.00095 |
divii |
0.0017 |
0.00095 |
dvmdii |
0.0017 |
0.00095 |
gcdii |
0.028 |
0.0092 |
bezout |
0.027 |
0.020 |
|
|
1000 digits |
Pari-2-3-0 |
Pari-2-3-0-gmp |
addii |
0.00062 |
0.00014 |
mulii |
0.051 |
0.016 |
diviiexact |
0.050 |
0.028 |
divii |
0.079 |
0.028 |
dvmdii |
0.081 |
0.028 |
gcdii |
1.1 |
0.14 |
bezout |
3.2 |
0.35 |
|
10000 digits |
Pari-2-3-0 |
Pari-2-3-0-gmp |
addii |
0.0058 |
0.00099 |
mulii |
2.3 |
0.56 |
diviiexact |
4.7 |
1.2 |
divii |
7.3 |
1.2 |
dvmdii |
7.3 |
1.2 |
gcdii |
94 |
5.5 |
bezout |
286 |
13 |
|
|
100000 digits |
Pari-2-3-0 |
Pari-2-3-0-gmp |
addii |
0.069 |
0.024 |
mulii |
89 |
17 |
diviiexact |
463 |
42 |
divii |
767 |
42 |
dvmdii |
767 |
42 |
gcdii |
9860 |
487 |
bezout |
32920 |
1280 |
|
64-bit machine: marie.medicis.polytechnique.fr.
The following timings were obtained on a Bi-Opteron 246 (2GHz) with 1Mo
of cache and 8Gb of RAM under Linux 2.6.8-12-amd64-k8-smp. GCC is
3.3.5.
100 digits |
Pari-2-3-0 |
Pari-2-3-0-gmp |
addii |
0.000040 |
0.000043 |
mulii |
0.00017 |
0.00019 |
diviiexact |
0.00029 |
0.00041 |
divii |
0.00057 |
0.00041 |
dvmdii |
0.00059 |
0.00041 |
gcdii |
0.014 |
0.0062 |
bezout |
0.012 |
0.016 |
|
|
1000 digits |
Pari-2-3-0 |
Pari-2-3-0-gmp |
addii |
0.00015 |
0.00024 |
mulii |
0.0088 |
0.0089 |
diviiexact |
0.0068 |
0.014 |
divii |
0.017 |
0.014 |
dvmdii |
0.017 |
0.014 |
gcdii |
0.38 |
0.090 |
bezout |
0.21 |
0.21 |
|
10000 digits |
Pari-2-3-0 |
Pari-2-3-0-gmp |
addii |
0.0012 |
0.0021 |
mulii |
0.40 |
0.37 |
diviiexact |
0.56 |
0.70 |
divii |
1.3 |
0.70 |
dvmdii |
1.3 |
0.70 |
gcdii |
25 |
2.9 |
bezout |
20 |
6.3 |
|
|
100000 digits |
Pari-2-3-0 |
Pari-2-3-0-gmp |
addii |
0.018 |
0.025 |
mulii |
16 |
12 |
diviiexact |
58 |
27 |
divii |
138 |
27 |
dvmdii |
138 |
27 |
gcdii |
2889 |
245 |
bezout |
2090 |
535 |
|