perf(dwio): Use SVE word gathers for narrow selected integers #139
All Vouch review confidence checks passed
Residual risk 0.18 = Change Risk (0.45) × (1 − Review Confidence (0.60)).
Review depth and reviewer attention state are adequate.
Model 1 · Change Risk (XGBoost)
Score: 0.45 · 451 lines diff across 5 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.366
Shallow Review Depth
shallow_review_depth
0.289
Real PR Conversation Timeline
1 comments
"Review active on #139"
general
weight: 0.35
thirtiseven
The existing SVE selected-row decoder computes 64-bit bit positions and gathers a 64-bit word for every row. On little-endian AArch64 a field up to 25 bits plus its intra-byte shift fits in a 32-bit word. Use word gather lanes for complete vectors of eligible rows and widen only when writing 64-bit outputs. Vera's 128-bit SVE implementation can process four rows per gather.
An unsigned lane comparison checks every selected row before using 32-bit arithmetic. A conservative row bound avoids multiplication overflow and supports unordered or repeated selections. The remaining rows use the existing 64-bit loop whenever the offset or mask needs it.
Incremental full-suite results on Vera
| Suite | Reference mean | Candidate mean | Elapsed-time reduction | Pair 1 / Pair 2 |
|---|---:|---:|---:|---|
| NDS | 117.920 s | 117.965 s | -0.04% | -0.69% / +0.61% |
| NDS-H | 63.043 s | 61.855 s | +1.88% | +2.77% / +0.99% |
Each arm contains the same eight-PR stack and used GCC 15.2 PGO, 42 executors with eight slots, the same jemalloc configuration and the same SF1000 input. The change to the trained native package is confined to the BitPackDecoder translation unit. The SQL results matched for all 508 executions. NDS-H completed faster in both pairs. NDS changed direction between pairs. The previous gather loops account for 0.35% and 0.49% of original NDS and NDS-H executor cycles, respectively. These samples and two pairs provide limited attribution of the NDS-H wall-time change to this kernel. This PR is a draft.
On narrow random/strided selections, the median isolated time reductions were 49.97% with 32-bit output and 46.01% with 64-bit output.
Verification
Combined candidate against the unchanged development branch
| Suite | Reference mean | Candidate mean | Elapsed-time reduction | Pair 1 / Pair 2 |
|---|---:|---:|---:|---|
| NDS | 122.055 s | 118.040 s | +3.29% | +3.52% / +3.06% |
| NDS-H | 63.799 s | 61.976 s | +2.86% | +5.16% / +0.53% |
This second series adds 508 reference-verified executions. The development comparison includes the preceding eight PRs. Full evidence and query breakdown
Instruction-address profiling in the full suites found 19.04% fewer sampled cycles in the selected gather loops on NDS and 25.36% fewer on NDS-H, including the fallback in the new build. The loops originally represented 0.35% and 0.49% of all executor cycles. One complete capture per build and suite supports this profile comparison. Full hotspot table and cycle counts