erikd / haskell-big-integer-experiment

An experiment in re-implementing big integers in Haskell.
Other
40 stars 6 forks source link

Three GMP alternatives #7

Closed ghost closed 6 years ago

ghost commented 7 years ago

I didn't find any mention in the code or tickets, so let me link three GMP alternatives that may or may not be suitable.

  1. https://github.com/libtom/libtommath
  2. https://github.com/wbhart/bsdnt
  3. Erlang/OTP is Apache2 licensed and the VM has a bigint impl https://github.com/erlang/otp/blob/master/erts/emulator/beam/big.h https://github.com/erlang/otp/blob/master/erts/emulator/beam/big.c
  4. http://www.kylheku.com/cgit/txr/tree/mpi

Do you think one of the above could be a candidate?

erikd commented 7 years ago

The point of this exercise is to get a pure Haskell implementation.

ghost commented 7 years ago

I had the idea that GMP reliance could be turned into something like optionally using Intel optimized math libraries, while the default dependency is one of the more compatibly licensed C implementations. This would be temporary as in to be replaced with a default impl in pure Haskell in the future. However, it's probably more likely that a Haskell version will be finished sooner if the alternative C implementation is skipped.

Would it make sense to add the links to the README as references, or should we just close the ticket and leave it at that?

erikd commented 6 years ago

I would prefer not to have to keep an up-to-date curated list so probably best if we just close this.

ghost commented 6 years ago

Agreed, that info belongs in a GHC ticket. The list of the various alternatives that could be used in build.mk via INTEGER_LIBRARY=internal should prove useful.