zeroshade commented on code in PR #1350:
URL: https://github.com/apache/arrow-go/pull/1350#discussion_r4189259902
##########
arrow/compute/vector_selection_bench_test.go:
##########
@@ -134,10 +148,115 @@ func BenchmarkFilterInt32FallbackControls(b *testing.B) {
}
}
+func BenchmarkFilterInt8FallbackControls(b *testing.B) {
+ benchmarkFilter8FallbackControls(b,
makeFilterInt8BenchmarkInputWithOffset)
+}
+
+func BenchmarkFilterUint8FallbackControls(b *testing.B) {
+ benchmarkFilter8FallbackControls(b,
makeFilterUint8BenchmarkInputWithOffset)
+}
+
+func benchmarkFilter8FallbackControls(
+ b *testing.B,
+ makeInput func(*testing.B, int, int64, func(int) bool) (arrow.Array,
arrow.Array),
+) {
+ controls := []struct {
+ name string
+ size int
+ offset int64
+ }{
+ {name: "unaligned-filter-offset", size: 1 << 16, offset: 3},
+ {name: "short", size: 56},
+ {name: "non-multiple-of-eight", size: 1<<16 + 1},
+ }
+
+ for _, control := range controls {
+ control := control
Review Comment:
Optional nit: `control := control` isn't needed since Go 1.22, and the loop
at L184 could be `for b.Loop()`. Both mirror the existing Int32 fallback
benchmark, so fine to leave.
--
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]