gcd_bitwise

Disclaimer: The code is not mine.

The code is part of the coreutils project. I have forked it for ease of use, for those who dont want to pull in big dependencies for calculating gcd.

Some notes: This code uses stein's algorithm, that replaces division with arithmetic shifts, comparisons, and subtraction, for optimization of performance. For more info on how efficient this algorithm is, please refer to this page.

Quick Start

```rust use gcd_bitwise::interface::GcdBuilder;

fn main() { let num1 = 15;

let num2 = 51;

let gcd = GcdBuilder::new(num1, num2);

let gcd = gcd.build();

println!("gcd: {}", gcd); // 3

} ```

The specific rust implementation from coreutils project showcases several performance optimisations: