PARI/GP

Main
  Download
  Packages
  GP in your browser
  Timeline
  Funding
  SEARCH

Help
  FAQ
  Documentation
  Tutorials
  Mailing Lists
  Contributed GP scripts

Development
  Ateliers PARI/GP
  Bugs
  Latest Changes
  Version Control
  Coding Guidelines
  PariDroid

Tests & benchmarks
  Buildlogs
  Coverage Report
  Doc Coverage
  Refcards test
  Benchmarks

Miscellaneous
  WWW Stats
  Logo
  Fun!
  Links

PARI library benchmarks: integer arithmetic

This page refers to version 2.9.5 of the PARI/GP system [ bench source code ], with native kernel and GMP kernel respectively. PARI and GMP-6.0.0 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 E5540 @ 2.53Ghz, running Linux 3.16.0-5-amd64. Libraries were compiled with gcc 7.3.0 and native flags.

100 digits pari-2.9.5-gmp pari-2.9.5
addii 0.000032 0.000032
sqri 0.000062 0.000094
mulii 0.000088 0.00011
sqrti 0.00024 0.00078
diviiexact 0.00013 0.00018
divii 0.00023 0.00026
dvmdii 0.00023 0.00028
redc 0.00014 0.00015
gcdii 0.0021 0.0096
bezout 0.0032 0.0055
invmod 0.0029 0.0047
ratlift 0.0025 0.0024
1000 digits pari-2.9.5-gmp pari-2.9.5
addii 0.00013 0.000083
sqri 0.0022 0.0031
mulii 0.0036 0.0052
sqrti 0.0014 0.0035
diviiexact 0.0032 0.0039
divii 0.0057 0.0077
dvmdii 0.0056 0.0078
redc 0.0065 0.0067
gcdii 0.050 0.22
bezout 0.066 0.12
invmod 0.059 0.094
ratlift 0.053 0.049
10000 digits pari-2.9.5-gmp pari-2.9.5
addii 0.0011 0.00065
sqri 0.092 0.14
mulii 0.12 0.22
sqrti 0.037 0.090
diviiexact 0.19 0.31
divii 0.28 0.64
dvmdii 0.28 0.64
redc 0.64 0.65
gcdii 1.3 13
bezout 2.3 6.1
invmod 2.0 4.2
ratlift 2.3 2.2
100000 digits pari-2.9.5-gmp pari-2.9.5
addii 0.010 0.0066
sqri 2.2 3.7
mulii 3.0 5.2
sqrti 1.7 6.5
diviiexact 5.6 30
divii 7.4 63
dvmdii 7.4 63
redc 63 65
gcdii 45 1192
bezout 74 569
invmod 66 376
ratlift 210 194

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

Xeon E5540 @ 2.53Ghz, running Linux 3.16.0-5-amd64. Libraries were compiled with gcc 7.3.0 -m32 and native flags.

100 digits pari-2.9.5-gmp pari-2.9.5
addii 0.000034 0.000041
sqri 0.00012 0.00025
mulii 0.00017 0.00033
sqrti 0.00044 0.0012
diviiexact 0.00028 0.00041
divii 0.00052 0.00055
dvmdii 0.00052 0.00058
redc 0.00041 0.00040
gcdii 0.0038 0.015
bezout 0.0054 0.013
invmod 0.0048 0.011
ratlift 0.0051 0.0052
1000 digits pari-2.9.5-gmp pari-2.9.5
addii 0.00010 0.00015
sqri 0.0049 0.012
mulii 0.0074 0.018
sqrti 0.0034 0.0079
diviiexact 0.0075 0.015
divii 0.019 0.030
dvmdii 0.019 0.031
redc 0.026 0.027
gcdii 0.088 0.37
bezout 0.14 0.38
invmod 0.12 0.27
ratlift 0.11 0.14
10000 digits pari-2.9.5-gmp pari-2.9.5
addii 0.00078 0.0013
sqri 0.15 0.56
mulii 0.22 0.74
sqrti 0.14 0.35
diviiexact 0.38 1.2
divii 0.64 2.8
dvmdii 0.64 2.8
redc 2.6 2.5
gcdii 3.8 25
bezout 5.1 24
invmod 4.5 16
ratlift 5.6 8.5
100000 digits pari-2.9.5-gmp pari-2.9.5
addii 0.0083 0.013
sqri 3.1 8.7
mulii 4.7 13
sqrti 3.4 26
diviiexact 9.4 119
divii 12 281
dvmdii 12 281
redc 258 253
gcdii 93 2352
bezout 151 2336
invmod 137 1544
ratlift 516 800

PARI/GP Development
Last Modified: 2018-04-26 10:34:50
Copyleft © 2003-2018 the PARI group.