yordan-pavlov commented on a change in pull request #1248:
URL: https://github.com/apache/arrow-rs/pull/1248#discussion_r799061079
##########
File path: arrow/src/buffer/mutable.rs
##########
@@ -475,35 +475,36 @@ impl MutableBuffer {
let (_, upper) = iterator.size_hint();
let upper = upper.expect("from_trusted_len_iter requires an upper
limit");
- let mut result = {
- let byte_capacity: usize = upper.saturating_add(7) / 8;
- MutableBuffer::new(byte_capacity)
- };
+ let aligned_len = bit_util::ceil(upper, 64) * 8;
+ let mut result = MutableBuffer::new(aligned_len);
'a: loop {
- let mut byte_accum: u8 = 0;
- let mut mask: u8 = 1;
+ let mut accum: u64 = 0;
Review comment:
that's interesting - I am curious @tustvold have you measured the
impact just from this change (from u8 to u64 accumulator) ?
--
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]