Next Change →
GHC Trac Home
GHC Git Repos
Report a bug
Mailing Lists & IRC
The GHC Team
GHC Status Info
Tickets I Created
Patches for review
New Feature Req
side by side
lines around each change
Show the changes in full context
White space changes
Apr 10, 2009 12:34:19 PM (
On this page:
1. [wiki:ReplacingGMPNotes#CurrentStatus Current Status]
1. [wiki:ReplacingGMPNotes#Introduction Introduction]
1. [wiki:ReplacingGMPNotes#ReasonsforReplacingGMPastheBignumlibrary Reasons for Replacing GMP as the Bignum library]
* [wiki:ReplacingGMPNotes/IntegerFunctionDesign Integer Function Design (C library)]
* [wiki:ReplacingGMPNotes/ReplacementLibraryIntegration Replacement Library Integration]
=== Current Status ===
The `Integer` type is now provided by a separate `integer` package, which provides an API that hides the implementation details. By default this is `integer-gmp`. To change it, set `INTEGER_LIBRARY=integer-foo` in `mk/build.mk`.
There is an alternative implementation [http://darcs.haskell.org/libraries/integer-simple/ integer-simple], although as we don't regularly test builds with it you may need to make a few tweaks to get it to work. `integer-simple` is intended to be easily understood, entirely Haskell code that is ''fast enough''. For serious number crunching one of the highly tuned big integer libraries will be needed, but hopefully `integer-simple` will suffice for normal use. In order to test this, we need to do some testing, e.g. nofib runs.
It would also be interesting to separate out the `J#/S#` wrapper from the GMP `Integer`, and to compare all 4 combinations: `GMP`, `GMP+J#/S#`, `simple`, `simple+S#/J#`.
If `integer-simple` is indeed fast enough, then I think that it solves all of the problems with `integer-gmp`. We would also have packages like `gmp` for those who want to use the fast C implementations.
=== Introduction ===