Dandandan commented on code in PR #7873:
URL: https://github.com/apache/arrow-rs/pull/7873#discussion_r2187339910


##########
arrow-array/src/array/byte_view_array.rs:
##########
@@ -473,10 +473,25 @@ impl<T: ByteViewType + ?Sized> GenericByteViewArray<T> {
     /// Note: this function does not attempt to canonicalize / deduplicate 
values. For this
     /// feature see  [`GenericByteViewBuilder::with_deduplicate_strings`].
     pub fn gc(&self) -> Self {
-        let mut builder = 
GenericByteViewBuilder::<T>::with_capacity(self.len());
+        let len = self.len();
+        let mut builder = GenericByteViewBuilder::<T>::with_capacity(len);

Review Comment:
   I think avoiding using the builder could make it faster



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