Skip to content

Commit a08f923

Browse files
authored
Remove unnecessary shifts in gcd() (#12480)
The `a` and `b` are shifted as a next instruction.
1 parent 4282c45 commit a08f923

File tree

1 file changed

+0
-2
lines changed
  • datafusion/functions/src/math

1 file changed

+0
-2
lines changed

datafusion/functions/src/math/gcd.rs

-2
Original file line numberDiff line numberDiff line change
@@ -102,8 +102,6 @@ pub(super) fn unsigned_gcd(mut a: u64, mut b: u64) -> u64 {
102102
}
103103

104104
let shift = (a | b).trailing_zeros();
105-
a >>= shift;
106-
b >>= shift;
107105
a >>= a.trailing_zeros();
108106
loop {
109107
b >>= b.trailing_zeros();

0 commit comments

Comments
 (0)