cetra3 commented on code in PR #9393:
URL: https://github.com/apache/arrow-rs/pull/9393#discussion_r2796442510
##########
arrow-buffer/src/builder/mod.rs:
##########
@@ -199,8 +199,9 @@ impl<T: ArrowNativeType> BufferBuilder<T> {
/// ```
#[inline]
pub fn append(&mut self, v: T) {
- self.reserve(1);
- self.buffer.push(v);
+ self.buffer.reserve(std::mem::size_of::<T>());
Review Comment:
I still think this is going to be faster since we don't need to multiply it
by `n`
--
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]