zeroshade commented on issue #36:
URL: https://github.com/apache/arrow-go/issues/36#issuecomment-5501423342

   This was addressed in #699 (`fe019f12`, "perf(arrow/array): pre-alloc bulk 
appends").
   
   Both `BinaryBuilder.AppendValues` and `AppendStringValues` now pre-calculate 
the total data size and call `ReserveData` before appending, which is exactly 
the change suggested here:
   
   ```go
   b.Reserve(len(v))
   
   // Pre-calculate total data size to minimize allocations
   totalDataSize := 0
   for _, vv := range v {
       totalDataSize += len(vv)
   }
   b.ReserveData(totalDataSize)
   ```
   
   Closing as resolved. Thanks for reporting it, and sorry it took a while to 
get tagged.


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