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: floating point 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. 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 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 mpfr-4.1.0
x*y 0.000062 0.000060 0.000069
x*x 0.000050 0.000048 0.000059
x/y 0.00016 0.00029 0.00017
sqrt(x) 0.00024 0.00078 0.00024
exp(x) 0.0055 0.0058 0.0031
log(x) 0.0071 0.012 0.0055
sin(x) 0.0048 0.0057 0.0038
cos(x) 0.0044 0.0047 0.0029
arccos(x) 0.013 0.024 0.021
arctan(x) 0.013 0.023 0.017
1000 digits pari-2.14.0-gmp pari-2.14.0 mpfr-4.1.0
x*y 0.0023 0.0021 0.0013
x*x 0.0011 0.0021 0.00078
x/y 0.0029 0.0041 0.0019
sqrt(x) 0.0021 0.0043 0.0016
exp(x) 0.16 0.19 0.083
log(x) 0.098 0.15 0.063
sin(x) 0.12 0.15 0.077
cos(x) 0.12 0.15 0.073
arccos(x) 0.34 0.55 0.16
arctan(x) 0.33 0.54 0.16
10000 digits pari-2.14.0-gmp pari-2.14.0 mpfr-4.1.0
x*y 0.053 0.12 0.050
x*x 0.038 0.081 0.028
x/y 0.12 0.24 0.083
sqrt(x) 0.078 0.20 0.059
exp(x) 5.7 13 4.3
log(x) 3.7 8.9 2.9
sin(x) 9.5 20 7.5
cos(x) 9.4 19 7.5
arccos(x) 16 36 7.6
arctan(x) 16 35 6.9

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 mpfr-4.1.0
x*y 0.00017 0.00017 0.00024
x*x 0.00015 0.00015 0.00018
x/y 0.00036 0.00030 0.00040
sqrt(x) 0.00057 0.0011 0.00050
exp(x) 0.0095 0.0097 0.0090
log(x) 0.011 0.016 0.014
sin(x) 0.0093 0.010 0.0091
cos(x) 0.0085 0.0086 0.0070
arccos(x) 0.027 0.036 0.050
arctan(x) 0.024 0.032 0.042
1000 digits pari-2.14.0-gmp pari-2.14.0 mpfr-4.1.0
x*y 0.0072 0.0091 0.0060
x*x 0.0048 0.0079 0.0035
x/y 0.012 0.011 0.0085
sqrt(x) 0.0079 0.012 0.0050
exp(x) 0.63 0.67 0.33
log(x) 0.34 0.50 0.24
sin(x) 0.47 0.62 0.32
cos(x) 0.46 0.60 0.31
arccos(x) 1.5 1.8 0.57
arctan(x) 1.5 1.7 0.55
10000 digits pari-2.14.0-gmp pari-2.14.0 mpfr-4.1.0
x*y 0.20 0.46 0.18
x*x 0.14 0.36 0.12
x/y 0.50 0.93 0.37
sqrt(x) 0.34 0.77 0.24
exp(x) 23 48 16
log(x) 15 34 11
sin(x) 34 78 27
cos(x) 33 77 27
arccos(x) 61 137 29
arctan(x) 61 136 26

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