PARI/GP

Main
  Download
  Packages
  GP in your browser
  Funding
  SEARCH

Help / Community
  FAQ
  Documentation
  Tutorials
  Mailing Lists
  Bugs
  Timeline
  Ateliers PARI/GP

Library
  Publications
  Contributed GP scripts
  Links
  Fun!

Development
  Latest Changes
  Version Control
  Coding Guidelines
  PariDroid
  Logo

Tests & benchmarks
  Buildlogs
  Coverage Report
  Doc Coverage
  Refcards test
  Benchmarks

  WWW Stats

PARI library benchmarks: integer arithmetic

This page refers to version 2.14.0 of the PARI/GP system [ bench source code ], with native kernel and GMP kernel respectively. PARI and GMP-6.1.2 were linked dynamically to the bench program.

The following tables give the cpu time in milliseconds spent by the PARI kernels for different operations, at different (decimal) 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 has N decimal digits.

64-bit machine: pari.math.u-bordeaux.fr

Xeon Silver 4110 @ 2.10Ghz, running Linux 4.19.0-18-amd64. Libraries were compiled with gcc 8.3.0 and native flags.

100 digits pari-2.14.0-gmp pari-2.14.0
addii 0.000015 0.000020
sqri 0.000031 0.000052
mulii 0.000043 0.000065
sqrti 0.00015 0.00056
diviiexact 0.000091 0.00012
divii 0.00014 0.00018
dvmdii 0.00014 0.00020
redc 0.000080 0.000079
gcdii 0.0012 0.0057
bezout 0.0016 0.0041
invmod 0.0014 0.0034
ratlift 0.0018 0.0018
1000 digits pari-2.14.0-gmp pari-2.14.0
addii 0.000031 0.000036
sqri 0.00099 0.0018
mulii 0.0017 0.0029
sqrti 0.00080 0.0023
diviiexact 0.0015 0.0024
divii 0.0030 0.0052
dvmdii 0.0030 0.0052
redc 0.0042 0.0042
gcdii 0.022 0.16
bezout 0.031 0.070
invmod 0.027 0.049
ratlift 0.024 0.026
10000 digits pari-2.14.0-gmp pari-2.14.0
addii 0.00024 0.00023
sqri 0.038 0.083
mulii 0.055 0.13
sqrti 0.019 0.057
diviiexact 0.084 0.22
divii 0.13 0.45
dvmdii 0.12 0.45
redc 0.43 0.43
gcdii 0.90 4.4
bezout 1.4 3.4
invmod 1.3 2.4
ratlift 1.2 1.2
100000 digits pari-2.14.0-gmp pari-2.14.0
addii 0.0031 0.0029
sqri 0.95 2.1
mulii 1.3 3.1
sqrti 0.73 4.1
diviiexact 2.5 21
divii 3.3 44
dvmdii 3.2 44
redc 43 43
gcdii 23 83
bezout 36 110
invmod 32 205
ratlift 98 106

32-bit machine: pari.math.u-bordeaux.fr

Xeon Silver 4110 @ 2.10Ghz, running Linux 4.19.0-18-amd64. Libraries were compiled with gcc 8.3.0 -m32 and native flags.

100 digits pari-2.14.0-gmp pari-2.14.0
addii 0.000025 0.000030
sqri 0.00011 0.00017
mulii 0.00017 0.00020
sqrti 0.00030 0.00088
diviiexact 0.00022 0.00026
divii 0.00032 0.00035
dvmdii 0.00032 0.00038
redc 0.00023 0.00027
gcdii 0.0018 0.0088
bezout 0.0027 0.0081
invmod 0.0023 0.0060
ratlift 0.0032 0.0033
1000 digits pari-2.14.0-gmp pari-2.14.0
addii 0.000073 0.000082
sqri 0.0047 0.0082
mulii 0.0070 0.011
sqrti 0.0021 0.0053
diviiexact 0.0068 0.0092
divii 0.012 0.018
dvmdii 0.012 0.018
redc 0.016 0.017
gcdii 0.048 0.29
bezout 0.096 0.33
invmod 0.081 0.23
ratlift 0.079 0.11
10000 digits pari-2.14.0-gmp pari-2.14.0
addii 0.00057 0.00054
sqri 0.14 0.37
mulii 0.20 0.46
sqrti 0.075 0.22
diviiexact 0.35 0.81
divii 0.48 1.7
dvmdii 0.48 1.7
redc 1.6 1.6
gcdii 2.6 7.9
bezout 4.2 9.9
invmod 3.7 16
ratlift 4.4 8.1
100000 digits pari-2.14.0-gmp pari-2.14.0
addii 0.0054 0.0057
sqri 2.7 5.8
mulii 3.9 8.6
sqrti 2.7 16
diviiexact 8.0 81
divii 9.9 171
dvmdii 9.9 169
redc 158 164
gcdii 78 223
bezout 127 344
invmod 116 1554
ratlift 392 788

PARI/GP Development
Last Modified: 2022-08-17 22:55:29
Copyleft © 2003-2021 the PARI group.