An experiment in re-implementing big integers in Haskell.
Haskell C Other
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
Check
Common/GHC/Integer
Criterion
GMP
MicroBench
New1
New2
New3
New4
Scripts
Simple
tools
wip
.gitignore
LICENSE
Makefile
Readme.md
bench-integer.hs
check-integer.hs
check-logic.hs
half-test.hs
karatsuba.hs
sanity-test.hs
test-internals.hs
times-bench.hs
times-check.hs

Readme.md

haskell-big-integer-experiment

This project aims to compare and contrast the two exisiting Haskell big integer implementations (integer-simple and integer-gmp) to a a new implementation that will hopefully replace the other two.

The reasons why a replacement for the above two is needed is explained here.

The Git checkout for this project contains copies of the integer-simple and integer-gmp trees (with some slight mods) as well as a number of alternative implementations of the new library. When a decent implementation for the new integer library emerges from this work it will be extracted and submitted for inclusion in the GHC tree.

This is still very much a work in progress. Patches and pull requests more than welcome.

Benchmarks

Benchmarks comparing the four versions of this library with integer-gmp and integer-simple are available here.

Requirements

Since we need to benchmark against the very latest versions of the integer-simple and inetger-gmp we need to run the latest versions of GHC which at the time of writing is 7.10.x (other versions will not work).

GNU Make is used for the build system.

The project is designed to use a cabal sandbox. The sandbox can be set up (and re-initialialized) using:

make sandbox-reinit

Kicking the tires

A real good place to start with this is running the test suite which is as easy as:

make check

To run the crierion benchmarks using:

make view-bench

which will run the bench marks and display them in firefox or whatever browser you set with the $BROWSER environment variable.

TODO

This is the TODO list, with highest priority first.

  • Improve Big Integer multiplication.
  • Benchmark division operations.