Skip to content

perf(internal/utils): add ARM64 NEON min/max for 8- and 16-bit integers - #1281

Merged
zeroshade merged 1 commit into
apache:mainfrom
fallintoplace:perf/internal-utils-arm64-neon-minmax
Sep 3, 2026
Merged

perf(internal/utils): add ARM64 NEON min/max for 8- and 16-bit integers#1281
zeroshade merged 1 commit into
apache:mainfrom
fallintoplace:perf/internal-utils-arm64-neon-minmax

Conversation

@fallintoplace

@fallintoplace fallintoplace commented Sep 2, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Add ARM64 NEON min/max kernels for int8, uint8, int16, and uint16.
  • Keep scalar tails and scalar fallback when ASIMD is unavailable or noasm is used.
  • Add boundary, extreme-value, and benchmark coverage.

Benchmark

Apple M1 Pro, n=65536, median of 3 runs:

Type noasm NEON
int8 65,642 ns/op 1,433 ns/op
uint8 66,233 ns/op 1,394 ns/op
int16 65,431 ns/op 2,807 ns/op
uint16 66,756 ns/op 2,726 ns/op

Checks

  • go test ./internal/utils -count=1
  • go test -race ./internal/utils -count=1
  • go test -tags noasm ./internal/utils -count=1
  • ARM_ENABLE_EXT=bogus go test ./internal/utils -count=1
  • go vet ./internal/utils
  • GOARCH=amd64 go test -c -o /dev/null ./internal/utils

@fallintoplace
fallintoplace force-pushed the perf/internal-utils-arm64-neon-minmax branch from e4d5fb8 to c312f3c Compare September 2, 2026 22:06
@fallintoplace fallintoplace changed the title perf(internal/utils): add ARM64 NEON min/max for narrow integers perf(internal/utils): add ARM64 NEON min/max for 8- and 16-bit integers Sep 2, 2026

@zeroshade zeroshade left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Verified locally on Apple M1: native NEON tests, -race, noasm parity, and an amd64 compile check all pass. Dispatch correctly guards on ASIMD detection with scalar tails and fallback.


This review was drafted by an AI-assisted tool and
confirmed by an Apache Arrow Go maintainer.

@zeroshade
zeroshade merged commit e521834 into apache:main Sep 3, 2026
71 of 77 checks passed
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.

2 participants