[m-users.] Possible Speedup for Arbitrary Precision Integers

Delmas Buckley rbuckley at ieee.org
Tue Apr 21 01:48:46 AEST 2015


Thanks, Matthias. Robert Buckley

On Mon, Apr 20, 2015 at 8:25 AM, Matthias G├╝demann <
matthias.guedemann at googlemail.com> wrote:

> Hi,
>
> I created a first pull-request which included changes to the power
> function in `integer.m`.
>
> This adds a simple version of square and multiply, which - for me - is
> faster than the current implementation, and already gives some speed-up
> (see the PL for examples) for the proposed Miller-Rabin solution. I
> tested it on the `tests/hard_coded` test cases.
>
> I deliberately left the division by two instead of a left shift by one;
> I did observe any speed-up when using `>>`. In addition, once there is a
> faster division algorithm, there may be even more benefit here.
>
> Best regards,
> Matthias
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mercurylang.org/archives/users/attachments/20150420/c45dde1d/attachment.html>


More information about the users mailing list