[m-rev.] multi-precision integers based on GMP

Matthias G├╝demann matthias at guedemann.org
Tue May 26 01:59:56 AEST 2015


I created a binding to GMP which offers a gmp_int data-type
corresponding to mpz_t, the GMP multi-precision signed integer.

It exports standard arithmetic operations, bitwise operations and some
number theoretic functions.

While libgmp is more complex than libtommath, its performance is much
better. Using gmp_int puts big integer arithmetic in Mercury close to
the performance of Haskell and OCaml and outperforms other logic
programming systems as SWI or YAP. There is deliberately not much error
checking going on, I really think that performance should be the number
one goal here.

I created a pull-request for this:


Best regards,

More information about the reviews mailing list