Skip to content

perf(compute): add ARM64 NEON comparison kernels - #1266

Open
fallintoplace wants to merge 2 commits into
apache:mainfrom
fallintoplace:perf/compute-arm64-neon-comparisons
Open

perf(compute): add ARM64 NEON comparison kernels#1266
fallintoplace wants to merge 2 commits into
apache:mainfrom
fallintoplace:perf/compute-arm64-neon-comparisons

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Aug 29, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Added ARM64 NEON kernels for primitive comparisons.
  • Covered int32, uint32, int64, uint64, float32, and float64.
  • Kept narrow integer types and unsupported builds on the generic path without the NEON wrapper.
  • Removed redundant 64-bit packing shifts from the hot loops.
  • Handled array/array, array/scalar, scalar/array, bitmap offsets, tails, NaNs, and unsigned boundary values.

Benchmark

Apple M1 Pro, 65,536 int64 values, nullprob=0.000000, 3 runs with -benchtime=1s. The generic baseline uses -tags noasm. Values below are medians.

Case NEON Generic Speedup
Array/scalar 29.6 us/op 76.3 us/op ~2.6x
Array/array 29.3 us/op 313.6 us/op ~10.7x

Native uses 29 allocs/op versus 30 for the generic baseline in both cases.

Tests

  • go test ./arrow/compute/internal/kernels ./arrow/compute -count=1
  • go test -tags noasm ./arrow/compute/internal/kernels ./arrow/compute -count=1
  • go test -race ./arrow/compute/internal/kernels ./arrow/compute -count=1
  • go vet ./arrow/compute/internal/kernels
  • Linux ARM64 and AMD64 cross-builds for the touched packages
  • Differential ARM64 coverage for offsets 0-7 and lengths through 1024

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant