Benchmarking GHC's Integer Libraries

GHC has two official Integer libraries, integer-gmp and integer-simple. This report shows their performance in comparison to a new library that aims to compete. As the new library improves, the results are linked from here.

2017/06/03 (ghc-8.2)

Basically the same as the previous result, but with the ghc-8.2rc2 pre-release.

2017/03/11 (ghc-8.0)

Basically the same as the 2016/03/08 result, but with the ghc-8.0.2 release.

2016/03/08 (ghc-8.0)

In the New3 tree, I implemented a couple of small straight line versions of 2x2 (machine Word), 3x2, 3x3, 4x2, 4x3 and 4x4 multiplication routines and then benchmarhed these against the others. Also switch New4 to have the same general multiplicaton routine as New3.

This is also the benchmark using the ghc 8.0.0 pre-release that has a different (and marginally slower) version of integer-gmp (cw ghc-7.10 and earlier)

Also dropped the comparison with the integer-simple library which was significantly slower across all tests, than any of the others.

2016/03/08 (ghc-7.10)

As with the test from 2016/03/07, but using ghc-7.10.

2016/03/07

Found some time to work on this recently and found that the performance had improved significantly, partly due to improvements in the 7.10.2/7.10.3 release of GHC and partly due to unboxing strict fields. The pure haskell version now beats integer-gmp on a number of benchmarks. Still a lot of work to do to fix the poor performance of multiplication.

2014/10/10

This version had significant improvements on Big Integer multiplication due to the hack in this commit discovered by Amos Robinson.

2014/09/20

This is the first benchmark result file I actually kept.