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: floating point arithmetic

This page refers to version 2.10.0-72240911 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. This benchmark was adapted from the MPFR bench, with a minor change: we precompute log(2) and π.

The following tables give the cpu time in milliseconds spent by the PARI kernels for different operations, at different (decimal) digitsizes.

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.10.0-72240911-gmp pari-2.10.0-72240911 mpfr-4.0.1
x*y 0.000094 0.000092 0.00013
x*x 0.000082 0.000082 0.000098
x/y 0.00028 0.00036 0.00026
sqrt(x) 0.00042 0.0011 0.00041
exp(x) 0.0087 0.0088 0.0076
log(x) 0.013 0.018 0.010
sin(x) 0.0078 0.0087 0.0072
cos(x) 0.0068 0.0072 0.0052
arccos(x) 0.025 0.036 0.043
arctan(x) 0.023 0.035 0.036
1000 digits pari-2.10.0-72240911-gmp pari-2.10.0-72240911 mpfr-4.0.1
x*y 0.0034 0.0034 0.0029
x*x 0.0023 0.0033 0.0017
x/y 0.0058 0.0062 0.0047
sqrt(x) 0.0042 0.0066 0.0031
exp(x) 0.32 0.30 0.18
log(x) 0.18 0.24 0.13
sin(x) 0.25 0.26 0.16
cos(x) 0.24 0.25 0.16
arccos(x) 0.67 0.85 0.33
arctan(x) 0.65 0.83 0.32
10000 digits pari-2.10.0-72240911-gmp pari-2.10.0-72240911 mpfr-4.0.1
x*y 0.13 0.25 0.11
x*x 0.093 0.15 0.073
x/y 0.28 0.35 0.20
sqrt(x) 0.18 0.30 0.13
exp(x) 13 21 9.6
log(x) 8.7 15 6.2
sin(x) 24 42 16
cos(x) 24 42 16
arccos(x) 37 60 16
arctan(x) 37 59 15

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.10.0-72240911-gmp pari-2.10.0-72240911 mpfr-4.0.1
x*y 0.00030 0.00027 0.00026
x*x 0.00017 0.00029 0.00020
x/y 0.00068 0.00058 0.00067
sqrt(x) 0.00083 0.0018 0.00074
exp(x) 0.017 0.016 0.013
log(x) 0.018 0.026 0.021
sin(x) 0.015 0.016 0.012
cos(x) 0.014 0.013 0.0086
arccos(x) 0.046 0.060 0.080
arctan(x) 0.040 0.053 0.067
1000 digits pari-2.10.0-72240911-gmp pari-2.10.0-72240911 mpfr-4.0.1
x*y 0.0077 0.014 0.0068
x*x 0.0050 0.016 0.0040
x/y 0.019 0.028 0.016
sqrt(x) 0.014 0.029 0.010
exp(x) 0.70 1.2 0.35
log(x) 0.58 0.96 0.46
sin(x) 0.61 0.97 0.35
cos(x) 0.59 0.92 0.34
arccos(x) 2.2 3.6 0.90
arctan(x) 2.2 3.5 0.85
10000 digits pari-2.10.0-72240911-gmp pari-2.10.0-72240911 mpfr-4.0.1
x*y 0.22 1.0 0.20
x*x 0.15 0.67 0.13
x/y 0.65 2.6 0.54
sqrt(x) 0.48 2.1 0.39
exp(x) 30 116 18
log(x) 19 83 15
sin(x) 43 180 31
cos(x) 43 178 31
arccos(x) 79 322 35
arctan(x) 78 319 31

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