[m-users.] Possible Speedup for Arbitrary Precision Integers
matthias.guedemann at googlemail.com
Tue Apr 21 01:25:40 AEST 2015
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.
More information about the users