parquet: SIMD-accelerate Sbbf probe via autovectorization #10011
All Vouch review confidence checks passed
Residual risk 0.16 = Change Risk (0.40) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.40 · 304 lines diff across 3 files
Model 2 · Review Depth (DistilBERT)
Depth Score: 0.17 · 1 substantive comment(s)
Model 3 · Review Timing & Attention
Session adequacy: 100% · Reviewer familiarity: 35%
Bedrock Claude 3 · Risk Narration
(disconnected)
Groq Risk Narration
AWS Bedrock is currently disconnected. Generate high-confidence PR triage narration on-demand using Groq.
Model 1 · Change Risk Attribution
SHAP Weights
Diff Size
diff_size
0.342
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #10011"
general
weight: 0.35
dmatth1
Which issue does this PR close?
No tracked issue — opening directly, following the precedent of apache/arrow-go#336 which shipped AVX2/SSE4/NEON SBBF probes in 18.3.0, and paralleling an in-progress
[[DISCUSS]](https://lists.apache.org/thread/omof0fq47tndfd80g5hwp2bvjmzvpb40) thread on
dev@arrow.apache.orgfor the C++ port of the same kernel.# Rationale for this change
Sbbf::check/Sbbf::insertare on the hot path of Parquet row-group skipping for every reader downstream ofarrow-rs(DataFusion, Databend, InfluxDB / IOx, RisingWave, GreptimeDB). Each 256-bit Parquet block is exactly one AVX2 vector;the K=8 lane test collapses to one
vptest(_mm256_testc_si256). This PR vectorises that loop on x86_64 without changing the algorithm, hash, salts, or wire format. NEON / aarch64 SIMD support is slated for a follow-up PR.# What changes are included in this PR?
- AVX2 kernel in
simd_x86, dispatched via cachedis_x86_feature_detected!("avx2")(dead-coded when-C target-cpu=native).- Scalar
Block::{check,insert}retained as the production fallback for non-AVX2 x86 / aarch64 / wasm32 / RISC-V / 32-bit / big-endian, and as the correctness reference the AVX2 kernel is diff-tested against.-
Blockchanged from#[repr(transparent)]to#[repr(C, align(32))]. Byte layout unchanged; alignment is asserted at compile time so the AVX2 aligned load/store contract is load-bearing.# Are these changes tested?
Yes. The 31 pre-existing
bloom_filterunit tests continue to pass on x86_64 with and without-C target-cpu=native. Two new diff tests —test_simd_{check,insert}_matches_scalar— assert bit-identical AVX2-vs-scalar output across 10K random(block, hash)pairs each. Benchmark results (Cascade Lake-class Xeon) are in the commit message. Benchmarks obtained with the changes in https://github.com/apache/arrow-rs/pull/10041.# Are there any user-facing changes?
No. Public API, MSRV, dependencies, and wire format are all unchanged. The only observable effect is faster
Sbbf::check/Sbbf::inserton x86_64 hosts with AVX2.---
The SIMD kernel was drafted with AI assistance and reviewed line-by-line; correctness is enforced in CI by the diff tests above.
cargo fmt --all -- --checkandcargo clippy -p parquet --all-targets -- -D warningsboth clean on this branch.