uint icon indicating copy to clipboard operation
uint copied to clipboard

`algorithms/gcd/gcd_old`: use single limb version when q is small enough?

Open github-actions[bot] opened this issue 2 years ago • 0 comments

On 2022-06-06 @recmo wrote in 4c74c09 “Merge pull request #110 from recmo/gcd”:

use single limb version when q is small enough?

    while r1 != U256::ZERO {
        let q = lehmer_double(r0.clone(), r1.clone());
        if q == Matrix::IDENTITY {
            // Do a full precision Euclid step. q is at least a halfword.
            // This should happen zero or one time, seldom more.
            // OPT: use single limb version when q is small enough?
            let q = &r0 / &r1;
            let t = r0 - &q * &r1;
            r0 = r1;
            r1 = t;
            let t = s0 - &q * &s1;

From src/algorithms/gcd/gcd_old.rs:387

github-actions[bot] avatar Jun 06 '22 03:06 github-actions[bot]