Benchmarking GHC's Integer Libraries

overview

GHC has two official Integer libraries, integer-gmp and integer-simple, the latter of which is significantly poorer that the former. This report shows the performance integer-gmp in comparison to a new library that aims to compete.

These tests are being carried out with GHC 8.2.0.20170507 on x86_64/linux and the git HEAD version of integer-gmp.

New1, New2, New3 and New4 use slightly different definitions of the Integer data structure to investigate how much difference that makes.

The meaning of Small/Medium/Big is as follows:

want to understand this report?

Small Integer addition and subtraction/GMP

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 7.346096070523885e-8 3.306872317424927e-5 1.0074117720137565e-7
Standard deviation 5.439124550866752e-8 2.8483579226219776e-7 9.373328675475055e-8

Outlying measurements have no (7.142487448889658e-3%) effect on estimated standard deviation.

Small Integer addition and subtraction/New1

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 7.850868488507904e-8 2.589396426115317e-5 1.3662412991063608e-7
Standard deviation 1.2181743754722948e-7 3.4829981986548005e-7 2.1755871196055874e-7

Outlying measurements have slight (8.539001811283455e-2%) effect on estimated standard deviation.

Small Integer addition and subtraction/New2

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 1.4303046870980528e-8 2.5417450091511348e-5 1.3252688487448667e-8
Standard deviation 7.394314031612309e-9 4.704403944558349e-8 1.451581459306722e-8

Outlying measurements have no (6.848989298454221e-3%) effect on estimated standard deviation.

Small Integer addition and subtraction/New3

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 1.2744881999596675e-8 1.917049471422186e-5 1.2391071286156093e-8
Standard deviation 7.85946267987781e-9 4.223920855142969e-8 1.4117499322382894e-8

Outlying measurements have no (6.622222222222205e-3%) effect on estimated standard deviation.

Small Integer addition and subtraction/New4

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 2.1736380469719135e-8 2.558806786668026e-5 3.3616473927740705e-8
Standard deviation 2.486081821787355e-8 8.594320572770103e-8 4.5565009138181386e-8

Outlying measurements have no (6.8962191358024685e-3%) effect on estimated standard deviation.

Big Integer addition and subtraction/GMP

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 1.4958715805725648e-7 1.0434912591649778e-4 2.7288145105267795e-7
Standard deviation 2.1616458937713308e-7 6.487828648471853e-7 2.8974528655557676e-7

Outlying measurements have no (8.546373365041453e-3%) effect on estimated standard deviation.

Big Integer addition and subtraction/New1

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 2.2488814702839133e-7 1.7804896433019354e-4 3.355383678164622e-7
Standard deviation 2.610640739276827e-7 8.46965316440936e-7 3.236128025257362e-7

Outlying measurements have no (9.43310657596372e-3%) effect on estimated standard deviation.

Big Integer addition and subtraction/New2

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 2.8026376916548976e-7 1.2433355241274298e-4 5.203137307068612e-7
Standard deviation 5.090291564642268e-7 1.2831778759056478e-6 9.911603842626673e-7

Outlying measurements have no (8.848852040816198e-3%) effect on estimated standard deviation.

Big Integer addition and subtraction/New3

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 1.3286697664588855e-7 1.1362907531568295e-4 3.153820322432014e-7
Standard deviation 2.5801775394264405e-7 6.23505423018249e-7 6.131375196107075e-7

Outlying measurements have no (8.694983071714442e-3%) effect on estimated standard deviation.

Big Integer addition and subtraction/New4

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 3.6913418636317524e-7 1.266795918760568e-4 2.3268824359486714e-7
Standard deviation 2.791718894342108e-7 1.0407713888706895e-6 5.605912175290892e-7

Outlying measurements have no (8.848852040816537e-3%) effect on estimated standard deviation.

Small Integer multiplication/GMP

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 1.1020161705132397e-5 1.1973480629171388e-2 1.2110238437466891e-5
Standard deviation 8.94556043898515e-6 3.1399333564089024e-5 1.4659703459266461e-5

Outlying measurements have slight (3.443877551020408e-2%) effect on estimated standard deviation.

Small Integer multiplication/New1

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 1.0794754586606475e-5 9.907701280455062e-3 1.1319404911405706e-5
Standard deviation 7.875081747973006e-6 2.936200712414456e-5 1.1646415575185761e-5

Outlying measurements have slight (3.222222222222222e-2%) effect on estimated standard deviation.

Small Integer multiplication/New2

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 7.126190510671135e-6 9.379812163476978e-3 9.253099244443258e-6
Standard deviation 6.687518949657207e-6 2.1611374444534956e-5 1.12157271832498e-5

Outlying measurements have slight (3.121748178980206e-2%) effect on estimated standard deviation.

Small Integer multiplication/New3

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 1.5814729832836806e-5 6.880688826748398e-3 1.280772242525513e-5
Standard deviation 1.2721723787240109e-5 3.982351583535958e-5 1.4685611527057846e-5

Outlying measurements have slight (2.7006172839506164e-2%) effect on estimated standard deviation.

Small Integer multiplication/New4

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 6.493151082925461e-6 7.929467924784642e-3 4.84338525461557e-6
Standard deviation 3.986712802960422e-6 1.596202967325857e-5 5.225084818207611e-6

Outlying measurements have slight (2.8546712802768114e-2%) effect on estimated standard deviation.

Small-Big Integer multiplication/GMP

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 2.4436505901993116e-5 1.7142656259928286e-2 1.9126566659304067e-5
Standard deviation 9.53924348144281e-6 5.351938634171905e-5 1.5261190925375853e-5

Outlying measurements have slight (4.158790170132304e-2%) effect on estimated standard deviation.

Small-Big Integer multiplication/New1

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 1.1753783969899526e-4 2.136092346997109e-2 6.206731483352178e-4
Standard deviation 3.566966493483547e-4 4.612491460736595e-4 5.062812799567549e-4

Outlying measurements have slight (4.5351473922902334e-2%) effect on estimated standard deviation.

Small-Big Integer multiplication/New2

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 7.95103433885759e-5 2.2631290530783988e-2 1.9575289950447133e-4
Standard deviation 1.6636448104670085e-4 2.719204170842181e-4 1.3904587578143345e-4

Outlying measurements have slight (4.75e-2%) effect on estimated standard deviation.

Small-Big Integer multiplication/New3

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 8.008241763732618e-5 1.8295258086760063e-2 2.061929220257032e-4
Standard deviation 1.3531389606227565e-4 2.838347402349462e-4 1.8880698255326826e-4

Outlying measurements have slight (4.338842975206612e-2%) effect on estimated standard deviation.

Small-Big Integer multiplication/New4

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 3.3139349881517594e-5 2.1569776113217354e-2 4.776687392913856e-5
Standard deviation 3.174227982144701e-5 8.535991489836282e-5 3.254889537895253e-5

Outlying measurements have slight (4.75e-2%) effect on estimated standard deviation.

Medium Integer multiplication/GMP

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 6.548868143481032e-6 7.616681974594371e-3 6.804552430259535e-6
Standard deviation 5.6308088132555524e-6 1.8906410818102283e-5 8.387385226862968e-6

Outlying measurements have slight (2.8546712802768163e-2%) effect on estimated standard deviation.

Medium Integer multiplication/New1

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 1.1145634748577216e-5 1.7358316685334454e-2 1.0850403078084547e-5
Standard deviation 6.280031640750893e-6 2.783715298148852e-5 8.467116545514425e-6

Outlying measurements have slight (4.158790170132301e-2%) effect on estimated standard deviation.

Medium Integer multiplication/New2

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 8.645136867061268e-5 1.821109711701529e-2 2.916124723960148e-4
Standard deviation 1.8971633238952122e-4 3.305638168020726e-4 2.716499667105491e-4

Outlying measurements have slight (4.338842975206612e-2%) effect on estimated standard deviation.

Medium Integer multiplication/New3

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 5.882186194346856e-6 8.43645911715974e-3 1.1823603838667651e-5
Standard deviation 1.2321880037668665e-5 2.4284350824759614e-5 2.643449884741407e-5

Outlying measurements have slight (2.9384756657483812e-2%) effect on estimated standard deviation.

Medium Integer multiplication/New4

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 4.2943803375210254e-5 1.4491104716521257e-2 1.3731760979480458e-4
Standard deviation 9.753243659670897e-5 1.6444841756780892e-4 1.7161505833205963e-4

Outlying measurements have slight (3.83999999999999e-2%) effect on estimated standard deviation.

Big Integer multiplication/GMP

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 4.163211557912938e-5 1.589818031080324e-2 5.9191971727854537e-5
Standard deviation 3.236811383030811e-5 1.2501751866250766e-4 4.019605334034526e-5

Outlying measurements have slight (3.9930555555555546e-2%) effect on estimated standard deviation.

Big Integer multiplication/New1

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 1.3915830414304442e-4 0.10404107491932932 9.229967827635577e-5
Standard deviation 9.04077084310232e-5 1.738792076722409e-4 1.1132792002066185e-4

Outlying measurements have slight (9.876543209876525e-2%) effect on estimated standard deviation.

Big Integer multiplication/New2

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 1.4237112001150298e-4 0.10409521991183951 9.021150320373539e-5
Standard deviation 7.771603677502988e-5 1.782687405494134e-4 9.389354941635099e-5

Outlying measurements have slight (9.876543209876543e-2%) effect on estimated standard deviation.

Big Integer multiplication/New3

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 3.521642143876347e-5 8.064285313824435e-2 2.8113975375249067e-5
Standard deviation 1.7702587366043113e-5 5.055439512232366e-5 3.1264816411042046e-5

Outlying measurements have slight (9.0e-2%) effect on estimated standard deviation.

Big Integer multiplication/New4

lower bound estimate upper bound
OLS regression xxx xxx xxx
R² goodness-of-fit xxx xxx xxx
Mean execution time 3.388443828665488e-5 8.032890595995974e-2 3.799352874082895e-5
Standard deviation 1.5661080170295415e-5 6.227707328862643e-5 1.5775024302409264e-5

Outlying measurements have slight (9.000000000000001e-2%) effect on estimated standard deviation.

understanding this report

In this report, each function benchmarked by criterion is assigned a section of its own. The charts in each section are active; if you hover your mouse over data points and annotations, you will see more details.

Under the charts is a small table. The first two rows are the results of a linear regression run on the measurements displayed in the right-hand chart.

We use a statistical technique called the bootstrap to provide confidence intervals on our estimates. The bootstrap-derived upper and lower bounds on estimates let you see how accurate we believe those estimates to be. (Hover the mouse over the table headers to see the confidence levels.)

A noisy benchmarking environment can cause some or many measurements to fall far from the mean. These outlying measurements can have a significant inflationary effect on the estimate of the standard deviation. We calculate and display an estimate of the extent to which the standard deviation has been inflated by outliers.