fallintoplace opened a new pull request, #1286:
URL: https://github.com/apache/arrow-go/pull/1286

   ## Summary
   
   * **Add an ARM64 NEON path** for null-free 32-bit fixed-width filters.
   * **Compact two groups of four values** with table-driven `VTBL`.
   * **Use exact-size stores** for the selected values.
   * Keep the current fallbacks for nulls, short or unaligned inputs, dense 
masks, unsupported CPUs, and `noasm` builds.
   
   ## Benchmark
   
   Hardware: Apple M1 Pro, macOS arm64, Go 1.26.3.
   
   Command: `go test ./arrow/compute -run '^$' -bench 
'^BenchmarkFilter(Int32|Float32)MixedMasks$' -benchtime=100ms -count=3 
-benchmem`
   
   The baseline used the same command with `GODEBUG=cpu.all=off`, which forces 
the existing scalar path. Values are median ns/op from three runs. Pattern 
order is `alternating / random25 / random50 / random75 / clustered50 / 
all-selected / none-selected`.
   
   | Type | Rows | Baseline ns/op | NEON ns/op | Speedup |
   | --- | ---: | --- | --- | --- |
   | int32 | 1K | 9002 / 6043 / 7167 / 6126 / 4336 / 4603 / 3376 | 4398 / 4345 
/ 4617 / 4679 / 4548 / 4812 / 3432 | 2.05x / 1.39x / 1.55x / 1.31x / 0.95x / 
0.96x / 0.98x |
   | int32 | 64K | 274954 / 145437 / 226114 / 192618 / 36169 / 45217 / 6176 | 
37957 / 69222 / 90711 / 71447 / 35481 / 46478 / 6306 | 7.24x / 2.10x / 2.49x / 
2.70x / 1.02x / 0.97x / 0.98x |
   | int32 | 1M | 4016235 / 2118964 / 3441839 / 2839365 / 300915 / 232850 / 
48657 | 340022 / 1273778 / 1530240 / 1312927 / 291230 / 235818 / 48973 | 11.81x 
/ 1.66x / 2.25x / 2.16x / 1.03x / 0.99x / 0.99x |
   | float32 | 1K | 8875 / 5979 / 7188 / 6157 / 4455 / 4647 / 3373 | 4428 / 
4286 / 4579 / 4686 / 4441 / 4844 / 3418 | 2.00x / 1.40x / 1.57x / 1.31x / 1.00x 
/ 0.96x / 0.99x |
   | float32 | 64K | 267098 / 145365 / 226897 / 193153 / 35817 / 44286 / 6171 | 
37340 / 71035 / 93770 / 73563 / 36372 / 44714 / 6239 | 7.15x / 2.05x / 2.42x / 
2.63x / 0.98x / 0.99x / 0.99x |
   | float32 | 1M | 4061853 / 2116060 / 3435942 / 2850531 / 304719 / 272701 / 
48689 | 344281 / 1268462 / 1516895 / 1300810 / 293596 / 233508 / 49292 | 11.80x 
/ 1.67x / 2.27x / 2.19x / 1.04x / 1.17x / 0.99x |
   
   Fallback controls stayed on the existing path:
   
   | Control | Baseline ns/op | NEON build ns/op |
   | --- | ---: | ---: |
   | unaligned filter offset 3 | 280053 | 271730 |
   | short input, 56 rows | 4436 | 4392 |
   | non-multiple length, 65537 rows | 272665 | 268016 |
   
   ## Tests
   
   * `go test ./arrow/compute/... -count=1`
   * `go test -race ./arrow/compute/internal/kernels ./arrow/compute -count=1`
   * `go test -tags noasm ./arrow/compute/internal/kernels ./arrow/compute 
-count=1`
   * `GOARCH=amd64 go test -c -o /dev/null ./arrow/compute/internal/kernels`
   * `GOARCH=amd64 go test -c -o /dev/null ./arrow/compute`
   
   ## Limitations
   
   * This is limited to ARM64 ASIMD, 32-bit fixed-width values, no value nulls, 
no filter nulls, aligned filter bitmap offsets, and lengths divisible by 8.
   * All other cases keep using the existing general or specialized paths.
   


-- 
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]

Reply via email to