tyrelr commented on a change in pull request #9304:
URL: https://github.com/apache/arrow/pull/9304#discussion_r563185541



##########
File path: rust/arrow/src/buffer.rs
##########
@@ -1188,6 +1260,57 @@ impl Drop for SetLenOnDrop<'_> {
     }
 }
 
+/// Creating a `MutableBuffer` instance by setting bits according to the 
boolean values
+impl std::iter::FromIterator<bool> for MutableBuffer {
+    fn from_iter<I>(iter: I) -> Self

Review comment:
       I prefer this implementation to the 'Buffer' implementation, since it 
has less pointer juggling.
   Originally, it was hair slower...  but with the MutableBuffer improvements, 
it appears to be a bit faster...  so that's good.
   ```
   group                                         bool-ecd919bde
   -----                                         --------------
   Buffer::from_iter bool                        1.00      7.2±0.06ms        ? 
B/sec
   MutableBuffer iter bitset                     1.00     62.1±0.05ms        ? 
B/sec
   MutableBuffer::from_iter bool                 1.00      6.3±0.01ms        ? 
B/sec
   ```
   
   




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

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


Reply via email to