[m-users.] Possible Speedup for Arbitrary Precision Integers
rbuckley at ieee.org
Fri Apr 17 10:28:28 AEST 2015
I haven't forgotten my promise to deliver source listings for Miller-Rabin
primality testing that improve performance using arbitrary precision
integers. None of the simple fixes I've tried so far have improved
performance. On RosettaCode.org I once posted an Erlang version of
Miller-Rabin that is fairly decent and vastly outperforms Mercury (to date,
at least). It occurs to me that there is an Erlang interface for Mercury.
Why not use Erlang for the big integer stuff, and Mercury for the things
it's best at? Don't know if this is practical, but it may be a solution for
To give credit where due, I believe someone else had posted a version of
Miller-Rabin in Erlang but it worked only for small integers. I revised it
to use arbitrary precision integers. It's not as fast as the
RosettaCode.org Miller-Rabin written in SWI Prolog, but it is fast.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the users