drahnreb1 opened a new issue, #36:
URL: https://github.com/apache/arrow-go/issues/36
### Describe the usage question you have. Please include as many useful
details as possible.
AppendValues and AppendStringValues of BinaryBuilder invoke `Reserve`
internally, but don't invoke `ReserveData`, e.g. by something like this:
```
totalLen := 0
for _, vv := range v {
totalLen += len(vv)
}
b.ReserveData(totalLen)
```
Is it on purpose that `ReserveData` is not invoked in these functions
because the idea is that users should do this themselves before invoking
AppendValues/AppendStringValues?
https://github.com/apache/arrow/blob/469430f50085b4b462fcc7db84a08cb554c698cd/go/arrow/array/binarybuilder.go#L159
https://github.com/apache/arrow/blob/469430f50085b4b462fcc7db84a08cb554c698cd/go/arrow/array/binarybuilder.go#L180
Using `ReserveData` can significantly improve performance (in case of the
benchmark test in
[reserve_data_test.go.txt](https://github.com/apache/arrow/files/14852568/reserve_data_test.go.txt)
by factor 2-3).
### Component(s)
Go
--
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]