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.0.2 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 3.2823086226253724e-5 3.2913331038605844e-5 3.304146047973392e-5
Standard deviation 2.633698690604387e-7 3.5817364305202145e-7 4.848631780939859e-7

Outlying measurements have slight (6.0390984201965724e-2%) 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 2.8256384088579493e-5 2.8278987263953036e-5 2.8327414928221307e-5
Standard deviation 5.229947795858714e-8 1.0740656169577306e-7 1.7016164506585e-7

Outlying measurements have no (6.944104846202959e-3%) 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 2.9651545534662916e-5 2.9678359245425267e-5 2.9721321698669408e-5
Standard deviation 8.361446681631959e-8 1.162700561003167e-7 1.8672137343121545e-7

Outlying measurements have no (6.992660186471173e-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.9546684229694417e-5 1.9578919389998416e-5 1.961090968099068e-5
Standard deviation 8.518421592900724e-8 1.0043656454001078e-7 1.3408291483257513e-7

Outlying measurements have no (6.6222222222219965e-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.490687497962735e-5 2.491299526802402e-5 2.4921768357592646e-5
Standard deviation 1.6480454562029907e-8 2.4541338174934568e-8 3.641453815266525e-8

Outlying measurements have no (6.848989298454221e-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.0649296100796721e-4 1.066136717190737e-4 1.0674324058217775e-4
Standard deviation 3.2353335166057396e-7 4.121082773674855e-7 5.071792306311483e-7

Outlying measurements have no (8.54637336504153e-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 1.844154957800276e-4 1.8469481645894435e-4 1.8497962210901937e-4
Standard deviation 6.838867140941136e-7 9.083519532083379e-7 1.2297108392974294e-6

Outlying measurements have no (9.433106575963511e-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 1.547810708311941e-4 1.5522360151898343e-4 1.5568357849168592e-4
Standard deviation 1.2799362461899177e-6 1.5430309289821273e-6 1.8596457025627654e-6

Outlying measurements have no (9.173525377229081e-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.385949334801943e-4 1.390013188136164e-4 1.3964005920852262e-4
Standard deviation 1.2701169920392985e-6 1.7567538402350776e-6 2.644857831850156e-6

Outlying measurements have slight (6.003510702196406e-2%) 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 1.5145268286052062e-4 1.5161784663183308e-4 1.5181384173124129e-4
Standard deviation 5.047690936637434e-7 6.044760450164912e-7 7.447246321049053e-7

Outlying measurements have no (9.173525377229081e-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.2018708099711143e-2 1.2039855700658198e-2 1.2074814165796357e-2
Standard deviation 4.0133900551162853e-5 6.930760382210033e-5 1.0058724727928837e-4

Outlying measurements have slight (3.4438775510204085e-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.0533736456195654e-2 1.05377428367956e-2 1.054270370644352e-2
Standard deviation 8.150149802460223e-6 1.1860950787312446e-5 1.6785614136931582e-5

Outlying measurements have slight (3.3293697978596694e-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 8.421276480743985e-3 8.436165956797982e-3 8.458340834355104e-3
Standard deviation 3.809780538842382e-5 5.233659434936353e-5 7.330361938264844e-5

Outlying measurements have slight (2.938475665748393e-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 5.366471807507059e-3 5.36997415035694e-3 5.372525751246492e-3
Standard deviation 6.076697994094989e-6 9.264419500448327e-6 1.3766317450784987e-5

Outlying measurements have slight (2.4375000000000004e-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.450810732022504e-3 6.46042960342104e-3 6.4751621167724056e-3
Standard deviation 2.2563544949682253e-5 3.6015789075174376e-5 4.845964853085427e-5

Outlying measurements have slight (2.6296566837107196e-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 1.773442020044452e-2 1.7738669183344786e-2 1.774372064868365e-2
Standard deviation 7.989024396461614e-6 1.0649532648992907e-5 1.4727692568242516e-5

Outlying measurements have slight (4.158790170132294e-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 2.016428199432058e-2 2.019485669533181e-2 2.026437140970743e-2
Standard deviation 5.137319148399913e-5 1.041130182973083e-4 1.6548534120163898e-4

Outlying measurements have slight (4.535147392290215e-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 1.98087814259037e-2 1.9811926164916754e-2 1.9817055032175644e-2
Standard deviation 5.874095416472591e-6 8.653092704237502e-6 1.2849476637140962e-5

Outlying measurements have slight (4.5351473922902424e-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 2.0156663255596063e-2 2.0172242252673746e-2 2.0193803894356172e-2
Standard deviation 2.545520135228572e-5 4.1613900799892194e-5 5.914492348956006e-5

Outlying measurements have slight (4.535147392290222e-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 1.9859734640110416e-2 1.9880671230525775e-2 1.98981879659319e-2
Standard deviation 3.316423793711272e-5 4.408789315871963e-5 5.7799512180086185e-5

Outlying measurements have slight (4.53514739229024e-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 7.681405208940003e-3 7.693537261730255e-3 7.706368013907415e-3
Standard deviation 3.135377705314532e-5 3.69447701536337e-5 4.595189886929595e-5

Outlying measurements have slight (2.8546712802768166e-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 9.949133791737116e-2 9.969585213932737e-2 9.996522841041731e-2
Standard deviation 1.9631410851013168e-4 3.642802399655625e-4 4.538208507001764e-4

Outlying measurements have slight (9.876543209876533e-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 9.907671481546709e-2 9.923085813080848e-2 9.963968657062731e-2
Standard deviation 5.075139096563862e-5 3.880452157408854e-4 6.037793599383022e-4

Outlying measurements have slight (9.876543209876541e-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 1.0557342820396446e-2 1.0559168146139518e-2 1.056177182604839e-2
Standard deviation 4.390084935157491e-6 5.863025112656369e-6 8.259617221425378e-6

Outlying measurements have slight (3.3293697978596805e-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 1.4196981779662254e-2 1.4211001866658413e-2 1.4241197542808542e-2
Standard deviation 2.1410159380151194e-5 4.80025468179264e-5 8.359704278627702e-5

Outlying measurements have slight (3.84e-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 1.5836577268971974e-2 1.5855730449828288e-2 1.5879872883290153e-2
Standard deviation 4.560166370507724e-5 5.406923577927229e-5 6.212711701402021e-5

Outlying measurements have slight (3.9930555555555414e-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 0.11006486094387498 0.11033339058445038 0.11128068888714765
Standard deviation 1.316574426934348e-4 6.711932767827661e-4 1.052588358050294e-3

Outlying measurements have slight (9.876543209876543e-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 0.10934870898527538 0.10947956005590506 0.10972688673420315
Standard deviation 1.4870205070003454e-4 2.6371652702101325e-4 3.746770417152396e-4

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 8.056035212201489e-2 8.068090220244363e-2 8.087513885801416e-2
Standard deviation 3.2511579957587204e-5 2.4855103566138125e-4 3.090894173226761e-4

Outlying measurements have slight (9.000000000000001e-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 7.98967685569728e-2 7.993073063109207e-2 7.997246713704206e-2
Standard deviation 3.7722196420799604e-5 6.191971507963284e-5 9.388211011449225e-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.