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 7.10.3 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 1.664510795067206e-5 1.6695976907849972e-5 1.674975128514615e-5
Standard deviation 1.5821951131854132e-7 1.8281174028133857e-7 2.1585920832795929e-7

Outlying measurements have slight (6.711080904232777e-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.6537226380436065e-5 2.6571260199856148e-5 2.663328662834293e-5
Standard deviation 9.560053067324859e-8 1.491727811065659e-7 2.415864584914893e-7

Outlying measurements have no (6.896219135802377e-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.7047343391399602e-5 2.7156262289885495e-5 2.729464516095419e-5
Standard deviation 3.302089048664268e-7 4.1077434698233403e-7 5.363859209443852e-7

Outlying measurements have moderate (0.10525639452657776%) 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.4270478193667991e-5 1.4285075928477931e-5 1.4308972514103977e-5
Standard deviation 4.7196879298838836e-8 6.442966383183967e-8 8.84144389062558e-8

Outlying measurements have no (6.328857154448453e-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.604236710639434e-5 2.6159044634523103e-5 2.634310727469812e-5
Standard deviation 3.2997422197281876e-7 4.6334645423521367e-7 6.857023128277117e-7

Outlying measurements have moderate (0.14470524194792816%) 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 6.84305411301719e-5 6.855846473467592e-5 6.878687903126751e-5
Standard deviation 3.139114636606347e-7 5.283663613641105e-7 9.589983210026046e-7

Outlying measurements have no (7.93600000000012e-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.107982164814057e-4 2.117985851430721e-4 2.1265304860175542e-4
Standard deviation 2.389624186705557e-6 2.9869853540500567e-6 4.10147421285692e-6

Outlying measurements have slight (7.369354326845395e-2%) 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.5377624813513722e-4 1.5410127459534773e-4 1.5479105261575397e-4
Standard deviation 9.165532049889986e-7 1.4862100940361237e-6 2.6594097474310587e-6

Outlying measurements have no (9.173525377229028e-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 7.480533396363263e-5 7.497785741285661e-5 7.518887708842828e-5
Standard deviation 4.893328128577588e-7 6.242945971744515e-7 8.852281430174844e-7

Outlying measurements have no (8.063983078855357e-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 7.822160027683054e-5 7.846989042366237e-5 7.872335484700813e-5
Standard deviation 7.004691336096897e-7 8.523788240591939e-7 1.0903703208958615e-6

Outlying measurements have no (8.129535071217308e-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 5.278720656459419e-5 5.28829322213985e-5 5.3026475240246336e-5
Standard deviation 2.821818730364951e-7 3.9631670918552813e-7 5.411139503950397e-7

Outlying measurements have no (7.633136094674153e-3%) 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.0275289273387683e-4 1.0289503001400918e-4 1.0303340178739712e-4
Standard deviation 3.9991549932928144e-7 4.841133663259493e-7 6.046215672008977e-7

Outlying measurements have no (8.546373365041483e-3%) 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 9.142366327685634e-5 9.159170443676012e-5 9.175351832288646e-5
Standard deviation 4.4696778987329664e-7 5.794561645940303e-7 8.837806640498286e-7

Outlying measurements have no (8.332744862650744e-3%) 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 4.692369230767415e-5 4.708777937182013e-5 4.734566115598364e-5
Standard deviation 5.270897030151984e-7 7.020805702202447e-7 9.712830269290147e-7

Outlying measurements have moderate (0.10007101992334287%) 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.459819583063579e-5 6.466841532853709e-5 6.477029064391836e-5
Standard deviation 2.0508583800072427e-7 2.919150740479299e-7 4.12525875640024e-7

Outlying measurements have no (7.873519778281827e-3%) 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.8436032455757025e-5 2.8565911609519593e-5 2.8809707943584233e-5
Standard deviation 3.7263169838055204e-7 5.595108087715583e-7 8.552521833252764e-7

Outlying measurements have moderate (0.1661201273192378%) 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.1721554509336206e-4 1.1790061954743054e-4 1.1866677466813296e-4
Standard deviation 2.2186185823978087e-6 2.5172106950288133e-6 2.986800683178416e-6

Outlying measurements have moderate (0.15831437384443936%) 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.2385868811668128e-4 1.244983643222767e-4 1.253063733083517e-4
Standard deviation 2.156521752736421e-6 2.617910209534217e-6 3.555586117628328e-6

Outlying measurements have moderate (0.15930042386124355%) 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.5627935375827433e-5 2.5655955212040804e-5 2.5700629045081457e-5
Standard deviation 7.823413927671294e-8 1.1395210526657667e-7 1.5603084294802644e-7

Outlying measurements have no (6.848989298454417e-3%) 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 2.5309970000805364e-5 2.5422107608389753e-5 2.5601884723620148e-5
Standard deviation 3.21217853847276e-7 4.707877697872207e-7 6.933443057840212e-7

Outlying measurements have moderate (0.15690906288175938%) 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 5.154716734108557e-4 5.161974842079974e-4 5.168811713970371e-4
Standard deviation 2.121733537497754e-6 2.5303743202698795e-6 3.1281394515256752e-6

Outlying measurements have slight (1.1763038548752738e-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 5.851997375709498e-3 5.873167643300902e-3 5.918396748864908e-3
Standard deviation 5.136421381337841e-5 8.656097397899445e-5 1.5553890747242274e-4

Outlying measurements have slight (2.5623268698060944e-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 6.0063248063265285e-3 6.01638081522338e-3 6.03222994107693e-3
Standard deviation 2.6114163175876448e-5 3.586830829781609e-5 5.122418972426577e-5

Outlying measurements have slight (2.5623268698060937e-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.116654483326416e-4 5.125611988625292e-4 5.144102866552168e-4
Standard deviation 2.4776402320191858e-6 4.136184550311726e-6 6.585867961533084e-6

Outlying measurements have slight (1.1763038548752939e-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 8.490524211640252e-4 8.501113702933653e-4 8.517209857156482e-4
Standard deviation 3.293509685117231e-6 4.484999439108011e-6 6.505337365718813e-6

Outlying measurements have slight (1.3330898466033603e-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.132803448680788e-3 4.13993103945959e-3 4.153247745741026e-3
Standard deviation 1.7260992710625116e-5 2.918664640416772e-5 4.848398788752939e-5

Outlying measurements have slight (2.2210743801652683e-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 4.102047771670631e-2 4.147789444798089e-2 4.234196674237741e-2
Standard deviation 8.537323710124385e-4 1.2335074886866033e-3 1.8966635780953089e-3

Outlying measurements have slight (6.222222222222222e-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 4.056575059568868e-2 4.065314215773216e-2 4.081734638250556e-2
Standard deviation 1.257895065325935e-4 2.2198057989938948e-4 3.529405409479762e-4

Outlying measurements have slight (6.2222222222222213e-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 2.336890805683332e-2 2.35237246421519e-2 2.3794428798776145e-2
Standard deviation 3.1108313560349217e-4 4.7462780807434787e-4 6.300499742512592e-4

Outlying measurements have slight (4.749999999999996e-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 2.160598841414704e-2 2.186619232677565e-2 2.215875274937489e-2
Standard deviation 5.976082267292317e-4 6.524865003341932e-4 7.314893766722952e-4

Outlying measurements have slight (8.765885978238942e-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.