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


##########
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:
   Yes it was benchmarked and made a positive difference when called in a hot 
loop (as it often is). Regardless it is better encapsulated and if we find a 
better way to implement this in future all call sites can benefit



-- 
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