fallintoplace opened a new pull request, #1222: URL: https://github.com/apache/arrow-go/pull/1222
## Summary - Reuse the `[]int` conversion scratch in dictionary index decoding. - Reuse the `[]bool` validity scratch in spaced dictionary decoding. - Clear reused validity entries before applying the next bitmap. - Add repeated dense and nullable decode tests. - Add a benchmark for 1, 64, 4096, and 65536 values. ## Benchmark **Command** ```text go test ./parquet/internal/encoding -run '^$' -bench '^BenchmarkDictByteArrayDecoderDecodeIndices$' -benchmem -benchtime=100ms -count=3 ``` **Machine:** Apple M1 Pro, arm64 **Go:** 1.26.3 The benchmark warms up one decode, then reuses the same decoder and dictionary builder for repeated batches. The spaced cases use 25% null values. | Case | Before | After | | --- | ---: | ---: | | Dense, 1 value | 4,944 B/op, 3 allocs/op | 4,944 B/op, 3 allocs/op | | Dense, 64 values | 5,712 B/op, 5 allocs/op | 5,200 B/op, 4 allocs/op | | Dense, 4096 values | 54,096 B/op, 5 allocs/op | 21,328 B/op, 4 allocs/op | | Dense, 65536 values | 791,378 B/op, 5 allocs/op | 267,089 B/op, 4 allocs/op | | Spaced, 64 values | 9,936 B/op, 8 allocs/op | 9,360 B/op, 6 allocs/op | | Spaced, 4096 values | 58,192 B/op, 6 allocs/op | 21,328 B/op, 4 allocs/op | | Spaced, 65536 values | 856,912 B/op, 6 allocs/op | 267,088 B/op, 4 allocs/op | ## Tests - `go test ./parquet/internal/encoding` - `go test ./parquet/file` -- 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]
