This is an automated email from the ASF dual-hosted git repository.

dheres pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/datafusion.git


The following commit(s) were added to refs/heads/main by this push:
     new a08f923c2a Remove unnecessary shifts in gcd() (#12480)
a08f923c2a is described below

commit a08f923c2acb1a46614970231d9a672c36ce3ad2
Author: Piotr Findeisen <[email protected]>
AuthorDate: Mon Sep 16 21:04:51 2024 +0200

    Remove unnecessary shifts in gcd() (#12480)
    
    The `a` and `b` are shifted as a next instruction.
---
 datafusion/functions/src/math/gcd.rs | 2 --
 1 file changed, 2 deletions(-)

diff --git a/datafusion/functions/src/math/gcd.rs 
b/datafusion/functions/src/math/gcd.rs
index 95a559c5d1..10faf9f390 100644
--- a/datafusion/functions/src/math/gcd.rs
+++ b/datafusion/functions/src/math/gcd.rs
@@ -102,8 +102,6 @@ pub(super) fn unsigned_gcd(mut a: u64, mut b: u64) -> u64 {
     }
 
     let shift = (a | b).trailing_zeros();
-    a >>= shift;
-    b >>= shift;
     a >>= a.trailing_zeros();
     loop {
         b >>= b.trailing_zeros();


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to