Files
mruby-mruby/mrbgems
Yukihiro "Matz" Matsumoto de2e8838ae mruby-bigint: replace euclidean gcd with binary gcd algorithm
Replace the traditional Euclidean GCD algorithm with Stein's binary GCD algorithm
for improved performance on large numbers:

- Implement binary GCD (Stein's algorithm) avoiding expensive division operations
- Use bit shifts and subtraction instead of modulo operations
- Handle special cases (zero values) efficiently
- Preserve common factors of 2 for correct results
- Maintain full compatibility with existing rational number functionality

Binary GCD is significantly faster for large numbers as it avoids the costly
division operations used in the Euclidean algorithm, using only bit operations,
addition, and subtraction.

Co-authored-by: Claude <noreply@anthropic.com>
2025-08-14 10:52:43 +09:00
..
2025-06-08 17:00:07 +09:00
2025-06-09 17:13:20 +09:00
2025-07-18 15:00:44 +09:00
2025-06-08 17:02:55 +09:00
2024-09-24 00:14:24 +10:00