Implementation of the GHC.Integer
type using the OpenSSL BIGNUM arbitrary size
integer library contained in libcrypto
.
This is currently in development and not yet ready for production. Integration
with GHC is discussed
here. If things work
out, this would be a free BSD-licensed alternative to the LGPL-licensed
integer-gmp
- used by default in GHC - with performance significantly faster
than integer-simple
- a BSD-licensed Haskell-only integer library.
The test suite gives a rough estimate what currently works as each function is checked against the builtin library.
Recent benchmarks of small, 128bit and 4096bit integers multiplication and
division indicate a 10-20% performance hit against integer-gmp
but significant
speedup compared to integer-simple
:
The source code for integer-openssl
is released under the BSD-3-Clause License.
GHC.Integer
interfaceencodeDoubleInteger
fails for newer LTS / GHC?gcdInteger
lcmInteger
int64ToInteger
word64ToInteger
integerToInt64
integerToWord64
Natural
implementation with integer-gmp (as its the same small/big abstraction)integer-crypto
?libcrypto
into GHC?