ch1bo / integer-openssl

Implementation of the 'GHC.Integer' type using the OpenSSL's arbitrary size integer library.
BSD 3-Clause "New" or "Revised" License
6 stars 1 forks source link

integer-openssl

Implementation of the GHC.Integer type using the OpenSSL BIGNUM arbitrary size integer library contained in libcrypto.

Work in progress

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:

License

The source code for integer-openssl is released under the BSD-3-Clause License.

TODO and ideas