fallintoplace opened a new pull request, #1171: URL: https://github.com/apache/arrow-go/pull/1171
### Rationale for this change Fixed-width array equality currently checks validity and values one element at a time. The values are already contiguous, so larger arrays can be compared much more efficiently in bulk. ### What changes are included in this PR? - Compare validity bitmaps in bulk. - Compare null-free integer and temporal arrays with `bytes.Equal`. - Walk contiguous valid runs for nullable arrays, ignoring bytes under null slots. - Keep floating-point arrays on the scalar path to preserve NaN and signed-zero behavior. - Keep arrays shorter than 8 values on the scalar path. - Add benchmarks for int32/int64 arrays, several null patterns, and mismatch positions. - Add tests for null-slot and floating-point semantics. On an M1 Pro with GOMAXPROCS=1, 65,536-value equality benchmarks improved as follows: | Case | Before | After | | --- | ---: | ---: | | int32, all valid | 505.9 µs | 6.5 µs | | int32, 1% null | 516.2 µs | 14.2 µs | | int32, alternating null | 432.2 µs | 247.9 µs | | int64, all valid | 520.0 µs | 13.2 µs | | int64, 1% null | 523.0 µs | 20.3 µs | | int64, alternating null | 439.0 µs | 245.9 µs | Allocations remain at zero. ### Are these changes tested? - `go test ./arrow/...` - `go test -race ./arrow/array` - `go vet -composites=false ./arrow/array` The full Arrow test run used the checked-out Parquet test data. ### Are there any user-facing changes? No. -- 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]
