Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

algorithms/gcd/gcd_old: Would this be faster using extended binary gcd? #111

Open
github-actions bot opened this issue Jun 6, 2022 · 0 comments
Open
Assignees
Labels
optimize Potential optimization opportunity tracker Issue tracked by bot

Comments

@github-actions
Copy link

github-actions bot commented Jun 6, 2022

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

Would this be faster using extended binary gcd?
We shadow q for readability.

}

/// Compute the Lehmer update matrix for small values.
///
/// This is essentialy Euclids extended GCD algorithm for 64 bits.
// OPT: Would this be faster using extended binary gcd?
// We shadow q for readability.
#[allow(clippy::shadow_unrelated)]
fn lehmer_small(mut r0: u64, mut r1: u64) -> Matrix {
    debug_assert!(r0 >= r1);
    if r1 == 0_u64 {
        return Matrix::IDENTITY;

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

@github-actions github-actions bot added optimize Potential optimization opportunity tracker Issue tracked by bot labels Jun 6, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
optimize Potential optimization opportunity tracker Issue tracked by bot
Projects
None yet
Development

No branches or pull requests

1 participant