Skip to content

perf(bitutil): add arm64 NEON bitmap ops - #1264

Open
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:perf/arrow-bitmap-arm64-ops
Open

perf(bitutil): add arm64 NEON bitmap ops#1264
fallintoplace wants to merge 1 commit into
apache:mainfrom
fallintoplace:perf/arrow-bitmap-arm64-ops

Conversation

@fallintoplace

Copy link
Copy Markdown
Contributor

What

  • Add arm64 NEON kernels for aligned bitmap AND, OR, and AND-NOT.
  • Process 64 bytes per loop and keep a scalar tail for short ranges.
  • Keep the existing Go path when ASIMD is not available.
  • Add AND-NOT coverage, large aligned-path coverage, and a benchmark for all three operations.

Benchmark

Apple M1 Pro. go test ./arrow/bitutil, 2s benchmark, one run.

Size Op Go path NEON
32 KiB AND 2021 ns 682 ns
32 KiB OR 2020 ns 681 ns
32 KiB AND-NOT 2022 ns 678 ns
128 KiB AND 8191 ns 3458 ns
128 KiB OR 8555 ns 3453 ns
128 KiB AND-NOT 8205 ns 3451 ns

The NEON path is about 2.4x to 3.0x faster with zero allocations in both paths.

Checks

  • go test ./arrow/...
  • go test -race ./arrow/bitutil
  • go vet ./arrow/bitutil
  • Linux arm64 and amd64 package compilation

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