PARI/GP
Main
  Download
  Packages
  GP in your browser
  Timeline
  Search

Support
  FAQ
  Documentation
  Tutorials
  Ateliers PARI/GP
  Mailing Lists

GP scripts library
  Contributed scripts

Development
  Bugs
  Latest Changes
  Version Control
  Coding Guidelines
  PariDroid
  Funding

Tests & benchmarks
  Buildlogs
  Coverage Report
  Doc Coverage
  Benchmarks

Miscellaneous
  WWW Stats
  Logo
  Fun!
  Links

PARI library benchmarks: floating point arithmetic

This page refers to version 2.9.0 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-4-amd64. Libraries were compiled with gcc 4.9.2 and native flags.

100 digits pari-2.9.0-gmp pari-2.9.0 mpfr-3.1.4
x*y 0.000091 0.000091 0.00013
x*x 0.000083 0.000083 0.000095
x/y 0.00030 0.00036 0.00025
sqrt(x) 0.00042 0.0011 0.00042
exp(x) 0.0088 0.0088 0.0082
log(x) 0.013 0.018 0.010
sin(x) 0.0078 0.0087 0.0072
cos(x) 0.0067 0.0071 0.0051
arccos(x) 0.024 0.037 0.043
arctan(x) 0.022 0.035 0.037
1000 digits pari-2.9.0-gmp pari-2.9.0 mpfr-3.1.4
x*y 0.0035 0.0033 0.0029
x*x 0.0033 0.0033 0.0017
x/y 0.0058 0.0062 0.0045
sqrt(x) 0.0042 0.0067 0.0042
exp(x) 0.30 0.30 0.17
log(x) 0.18 0.24 0.15
sin(x) 0.25 0.26 0.17
cos(x) 0.25 0.25 0.16
arccos(x) 0.72 0.85 0.34
arctan(x) 0.70 0.83 0.33
10000 digits pari-2.9.0-gmp pari-2.9.0 mpfr-3.1.4
x*y 0.13 0.24 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.18
exp(x) 13 21 9.6
log(x) 8.7 15 7.7
sin(x) 24 42 17
cos(x) 24 41 17
arccos(x) 37 60 17
arctan(x) 37 59 15

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

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

100 digits pari-2.9.0-gmp pari-2.9.0 mpfr-3.1.4
x*y 0.00025 0.00027 0.00026
x*x 0.00017 0.00030 0.00020
x/y 0.00064 0.00066 0.00065
sqrt(x) 0.00093 0.0018 0.0010
exp(x) 0.015 0.016 0.013
log(x) 0.019 0.027 0.023
sin(x) 0.014 0.016 0.013
cos(x) 0.013 0.014 0.0094
arccos(x) 0.048 0.064 0.084
arctan(x) 0.042 0.055 0.071
1000 digits pari-2.9.0-gmp pari-2.9.0 mpfr-3.1.4
x*y 0.0076 0.027 0.0069
x*x 0.0050 0.016 0.0040
x/y 0.019 0.028 0.016
sqrt(x) 0.014 0.030 0.014
exp(x) 0.68 1.5 0.35
log(x) 0.56 1.2 0.52
sin(x) 0.60 1.5 0.36
cos(x) 0.58 1.4 0.34
arccos(x) 2.2 3.7 0.94
arctan(x) 2.2 3.6 0.88
10000 digits pari-2.9.0-gmp pari-2.9.0 mpfr-3.1.4
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.48
exp(x) 30 118 18
log(x) 19 83 17
sin(x) 42 183 33
cos(x) 41 180 32
arccos(x) 75 323 35
arctan(x) 74 320 32

PARI/GP Development
Last Modified: 2016-08-02 15:02:15
Copyleft © 2003-2016 the PARI group.