fallintoplace opened a new pull request, #1230: URL: https://github.com/apache/arrow-go/pull/1230
## What - Reuse an allocator-backed scratch buffer in `deltaBitPackEncoder.PutSpaced`. - Keep the buffer capacity between calls and release it with the encoder. - Keep the existing compaction path unchanged. ## Benchmark Apple M1 Pro, Go 1.26.3. Steady-state repeated `PutSpaced` plus `FlushValues` calls on the same encoder, with 10% nulls. Scratch growth is done before timing. Command: `go test -vet=off ./parquet/internal/encoding -run "^$" -bench "^BenchmarkDeltaBinaryPackedPutSpaced(Int32|Int64)$" -benchmem -benchtime=300ms -count=3 -cpu=1` | Type | Length | Before | After | | --- | ---: | ---: | ---: | | INT32 | 1,024 | 5,333 B/op, 36 allocs/op | 469 B/op, 35 allocs/op | | INT32 | 65,536 | 282,188 B/op, 1,851 allocs/op | 11,836 B/op, 1,850 allocs/op | | INT64 | 1,024 | 9,941 B/op, 36 allocs/op | 469 B/op, 35 allocs/op | | INT64 | 65,536 | 544,346 B/op, 1,851 allocs/op | 11,836 B/op, 1,850 allocs/op | ## Tests - `go test ./parquet/internal/encoding -count=1` - `PARQUET_TEST_DATA=parquet-testing/data go test ./... -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]
