andygrove commented on code in PR #1954: URL: https://github.com/apache/datafusion-comet/pull/1954#discussion_r2183701580
########## native/spark-expr/src/bloom_filter/spark_bit_array.rs: ########## @@ -102,8 +101,10 @@ impl SparkBitArray { } } +/// Returns the number of 64-bit words needed to store a `num_bits`-bits value +#[inline] pub fn num_words(num_bits: i32) -> i32 { - bit::ceil(num_bits as usize, 64) as i32 + ((num_bits as usize) / 64 + ((num_bits % 64 != 0) as usize)) as i32 Review Comment: What is the purpose of this change? It seems to be manually inlining the `bit::ceil` function? ```rust pub fn ceil(value: usize, divisor: usize) -> usize { value / divisor + ((value % divisor != 0) as usize) } ``` -- 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-unsubscr...@datafusion.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org --------------------------------------------------------------------- To unsubscribe, e-mail: github-unsubscr...@datafusion.apache.org For additional commands, e-mail: github-h...@datafusion.apache.org