perf(compute): vectorize mixed int32 filters with AVX2 - #1284
Merged
zeroshade merged 1 commit intoSep 3, 2026
Conversation
zeroshade
approved these changes
Sep 3, 2026
Member
There was a problem hiding this comment.
Dispatch guards are sound (AVX2 probe, length%8, byte-aligned filter offset, bounds check, null-free inputs only, mixed-mask heuristic) and GetSpanValues applies span offsets, so the sliced-input case is safe. The c2goasm source is included per repo convention. The AVX2 path itself will be exercised by the AMD64 CI jobs I've just approved.
This review was drafted by an AI-assisted tool and
confirmed by an Apache Arrow Go maintainer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
vpshufband use masked stores for the compact output.noasmbuilds.Benchmark
The benchmark is in
arrow/compute/vector_selection_bench_test.go.It covers alternating, random 25/50/75%, clustered 50%, all-selected, and none-selected masks at 1K, 64K, and 1M rows.
A native AVX2 run needs an x86_64 machine with AVX2. The benchmark also runs on the local Apple M1, but that only exercises the existing arm64 fallback, so no local AVX2 timing is included.
Tests
go test ./arrow/compute/internal/kernels ./arrow/computego test -tags noasm ./arrow/compute/internal/kernels ./arrow/computego test -race ./arrow/compute/internal/kernels ./arrow/compute