fallintoplace opened a new pull request, #1200: URL: https://github.com/apache/arrow-go/pull/1200
## What `TableReader.Next` allocated two column slices for every record batch. This keeps the batch slice on `TableReader` and reads the current chunks again after finding the batch size. `NewRecordBatch` copies the input slice, so the scratch slice can be safely reused on the next call. ## Benchmark The benchmark reuses one reader across passes. It uses Int32 columns with 256 rows per chunk. 256 columns x 256 chunks: - 10.2 ms -> 3.0 ms - 3.76 MB -> 1.27 MB - 1024 -> 512 allocations The benchmark covers 4, 32, and 256 columns with 32 and 256 chunks. ## Tests - `go test ./arrow/array -count=1` - `go test -race ./arrow/array -run TestTableReader -count=1` -- 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]
