tustvold commented on code in PR #5760:
URL: https://github.com/apache/arrow-rs/pull/5760#discussion_r1599599932


##########
arrow-array/src/builder/boolean_builder.rs:
##########
@@ -166,6 +166,14 @@ impl BooleanBuilder {
         BooleanArray::from(array_data)
     }
 
+    /// Returns the current values buffer as a slice
+    ///
+    /// Boolean values are bit-packed into bytes, so to read the i-th boolean,
+    /// you must compute `values_slice[i / 8] & (1 << (i % 8)) == 0`.

Review Comment:
   It was years ago, but I believe it was one of the benchmarks involving 
boolean array iteration. Although that being said most of those use-cases now 
use BitChunks or UnalignedBitChunks, and so it is possible very few hot kernels 
are even using this method anymore.
   
   If you wanted to file a PR to optimise this function, I think that would be 
well received



-- 
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: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to