fallintoplace opened a new pull request, #1237: URL: https://github.com/apache/arrow-go/pull/1237
## Summary - Pack BooleanBuilder values into the bitmap one byte at a time. - Handle unaligned prefixes and trailing values without changing neighboring bits. - Reuse the 8-value pack helper for value and validity bitmaps. - Add exhaustive bitmap coverage and a BooleanBuilder benchmark. ## Benchmark Apple M1 Pro. 65,536 values. The builder is pre-reserved. Median of 5 runs. | Benchmark | upstream main | this PR | change | | --- | ---: | ---: | ---: | | BooleanBuilder / all false | 145 us | 18.6 us | 7.8x | | BooleanBuilder / alternating | 145 us | 18.6 us | 7.8x | | Boolean / all valid | 160 us | 34.4 us | 4.6x | | Boolean / 50% null | 161 us | 35.7 us | 4.5x | The first two rows use nil validity. The last two use the existing explicit-validity benchmark. ```text go test ./arrow/array -run '^$' -bench '^BenchmarkBooleanBuilderAppendValues$' -benchmem -benchtime=100ms -count=5 go test ./arrow/array -run '^$' -bench '^BenchmarkAppendValuesWithValidity/boolean/' -benchmem -benchtime=100ms -count=5 ``` ## Tests - `go test ./arrow/array -count=1` - `go test -race ./arrow/array -count=1` - `go test ./arrow/bitutil ./arrow/compute/... -count=1` - `go vet ./arrow/array ./arrow/bitutil` -- 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]
