You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@arrow.apache.org by "mbrobbel (via GitHub)" <gi...@apache.org> on 2025/09/15 19:45:22 UTC

Re: [PR] improve performance of i256 to f64 [arrow-rs]

mbrobbel commented on code in PR #8041:
URL: https://github.com/apache/arrow-rs/pull/8041#discussion_r2349935808


##########
arrow-buffer/src/bigint/mod.rs:
##########
@@ -586,6 +586,25 @@ impl i256 {
     pub const fn is_positive(self) -> bool {
         self.high.is_positive() || self.high == 0 && self.low != 0
     }
+
+    fn leading_zeros(&self) -> u32 {
+        match self.high {
+            0 => 128 + self.low.leading_zeros(),

Review Comment:
   ```suggestion
               0 => u128::BITS + self.low.leading_zeros(),
   ```



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: github-unsubscribe@arrow.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org