fallintoplace opened a new pull request, #1261: URL: https://github.com/apache/arrow-go/pull/1261
## Summary - Reuse `[]parquet.ByteArray` scratch for spaced compaction in `DELTA_LENGTH_BYTE_ARRAY`. - Reuse the same scratch pattern in `DELTA_BYTE_ARRAY`. - Clear the scratch after encoding so input payload slices are not retained. - Add offset, correctness, reuse, and benchmark coverage. ## Benchmark 64K values with 16-byte values on an Apple M1 Pro, Go 1.26.3, 1 CPU, 250 ms per sample, 9 samples. Values are medians. | Encoder / validity | ns/op before | ns/op after | B/op before | B/op after | allocs/op before | allocs/op after | | --- | ---: | ---: | ---: | ---: | ---: | ---: | | DELTA_LENGTH_BYTE_ARRAY / all valid | 1,209,684 | 886,099 | 1,577,916 | 5,000 | 2,055 | 2,054 | | DELTA_LENGTH_BYTE_ARRAY / 50% null | 1,049,068 | 692,072 | 1,575,636 | 2,696 | 1,031 | 1,030 | | DELTA_BYTE_ARRAY / all valid | 2,618,095 | 1,957,687 | 1,633,022 | 57,918 | 4,111 | 4,109 | | DELTA_BYTE_ARRAY / 50% null | 1,776,488 | 1,141,407 | 1,604,656 | 31,066 | 2,063 | 2,061 | ## Checks - `go test ./...` - `go test -race ./parquet/internal/encoding -count=1` - `go vet ./parquet/internal/encoding` - `git diff --check` No public API changes. -- 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]
