rluvaton commented on code in PR #9393:
URL: https://github.com/apache/arrow-rs/pull/9393#discussion_r2793135338


##########
arrow-buffer/src/builder/mod.rs:
##########
@@ -218,8 +219,12 @@ impl<T: ArrowNativeType> BufferBuilder<T> {
     /// ```
     #[inline]
     pub fn append_n(&mut self, n: usize, v: T) {
-        self.reserve(n);
-        self.extend(std::iter::repeat_n(v, n))
+        self.buffer.reserve(n * std::mem::size_of::<T>());

Review Comment:
   can we revert this as this is the same as `self.reserve(n)`?
   
   ```suggestion
           self.reserve(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]

Reply via email to