PARI/GP
Main
  Download
  Packages
  Timeline
  Search

Support
  FAQ
  Documentation
  Tutorials
  Ateliers PARI/GP
  Mailing Lists

GP scripts library
  Contributed scripts

Development
  Bugs
  Latest Changes
  Version Control
  Coding Guidelines

Tests & benchmarks
  Buildlogs
  Coverage report
  Benchmarks

Miscellaneous
  WWW Stats
  Logo
  Fun!
  Links

PARI library benchmarks: floating point arithmetic

This page refers to the stable version 2.5.5 of the PARI/GP system [ bench source code ], with native kernel and GMP kernel respectively. PARI and GMP-4.3.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-bordeaux1.fr

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

100 digits pari-2.5.5-gmp pari-2.5.5 mpfr-3.0.0
x*y 0.00010 0.000099 0.00012
x*x 0.000089 0.000091 0.000089
x/y 0.00027 0.00037 0.00026
sqrt(x) 0.00041 0.00098 0.00042
exp(x) 0.011 0.011 0.0077
log(x) 0.011 0.016 0.0094
sin(x) 0.0092 0.0098 0.0068
cos(x) 0.0084 0.0083 0.0051
arccos(x) 0.026 0.037 0.041
arctan(x) 0.025 0.036 0.035
1000 digits pari-2.5.5-gmp pari-2.5.5 mpfr-3.0.0
x*y 0.0038 0.0035 0.0030
x*x 0.0024 0.0035 0.0023
x/y 0.0070 0.0061 0.0074
sqrt(x) 0.0044 0.0075 0.0044
exp(x) 0.38 0.35 0.18
log(x) 0.21 0.26 0.17
sin(x) 0.32 0.30 0.19
cos(x) 0.32 0.29 0.18
arccos(x) 0.76 0.91 0.38
arctan(x) 0.75 0.89 0.36
10000 digits pari-2.5.5-gmp pari-2.5.5 mpfr-3.0.0
x*y 0.14 0.27 0.12
x*x 0.095 0.27 0.094
x/y 0.30 0.34 0.30
sqrt(x) 0.19 0.31 0.19
exp(x) 14 22 11
log(x) 9.2 16 8.1
sin(x) 29 48 19
cos(x) 28 48 19
arccos(x) 36 63 20
arctan(x) 35 62 18

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

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

100 digits pari-2.5.5-gmp pari-2.5.5 mpfr-3.0.0
x*y 0.00036 0.00043 0.00036
x*x 0.00030 0.00042 0.00031
x/y 0.00053 0.00068 0.00060
sqrt(x) 0.00097 0.0017 0.0010
exp(x) 0.020 0.021 0.018
log(x) 0.018 0.026 0.023
sin(x) 0.018 0.020 0.015
cos(x) 0.016 0.017 0.011
arccos(x) 0.050 0.068 0.081
arctan(x) 0.045 0.060 0.067
1000 digits pari-2.5.5-gmp pari-2.5.5 mpfr-3.0.0
x*y 0.014 0.029 0.011
x*x 0.013 0.029 0.013
x/y 0.023 0.032 0.022
sqrt(x) 0.016 0.034 0.016
exp(x) 1.1 1.8 0.69
log(x) 0.72 1.3 0.60
sin(x) 1.0 1.8 0.82
cos(x) 0.97 1.7 0.77
arccos(x) 2.9 4.7 1.2
arctan(x) 2.9 4.6 1.2
10000 digits pari-2.5.5-gmp pari-2.5.5 mpfr-3.0.0
x*y 0.45 1.4 0.40
x*x 0.39 1.4 0.39
x/y 1.0 2.8 1.0
sqrt(x) 0.71 2.3 0.70
exp(x) 50 162 37
log(x) 32 101 29
sin(x) 92 254 66
cos(x) 91 250 65
arccos(x) 125 393 70
arctan(x) 124 391 62

PARI/GP Development
Last Modified: 2013-10-06 17:35:49
Copyleft © 2003-2013 the PARI group.