← Back to Pull requests

Prefer Google Highway native SIMD by default #751

Closed
unknown closed this pull request without merging on Oct 15, 2026 21:37 UTC
View on GitHub
unknown unknown commented on Oct 12, 2026 22:34 UTC
Author

Summary

Prefer Google Highway native SIMD by default on supported Linux x86-64/AArch64 systems running Java 22+ with the Vector API enabled. Existing Java fallbacks remain available. Closes #750.

Compatibility

  • Opt out with -Djvector.enable_native_vectorization=false. The deprecated experimental alias remains supported; the new property wins. Explicit provider selection takes precedence over both.

  • Before selecting native, require ABI 1 in the library's supported set, all bound symbols, and a successful ISA accessor call. Unavailable or incompatible libraries and denied native access fall back to Panama; explicitly forcing native fails at startup.

  • Native selection uses MemorySegmentVectorFloat. Use VectorFloat and FloatArray.array() instead of concrete array casts. copyFrom supports both built-in storage types; native arithmetic still requires provider-created vectors.

  • Includes #754's repros and fixes, security-policy handling, best-effort temporary-library cleanup, and user/developer documentation.
  • Kernel implementations and ISA dispatch are unchanged by this PR. #753's additional kernels are already merged into main.

    Validation

    All four checks passed on the remote Linux x86-64 server with c0095f06 combined with main 8c33f97a. Native tests used the rebuilt library.

    | Check | Result |
    | --- | --- |
    | Java 22 provider, numeric, and storage tests | 33 passed, 2 skipped |
    | Java 25 full native reactor tests | 465 passed, 5 skipped |
    | Java 17 / Java 11-compatible profile tests | 13 passed, 16 skipped |
    | Java 25 packaging, Javadoc, and license checks | Passed |

    Performance

    A separate study compared integrated Highway improvements (4e7d397c) with the Panama candidate from #755 on an Intel Xeon 6985P-C. Highway had higher observed QPS in all 32 comparisons across four million-vector datasets, JDK 22/25, 1/8 query threads, and overquery factors 1/2.

    | Dataset | JDK 22 QPS gain | JDK 25 QPS gain |
    | --- | ---: | ---: |
    | MPNet | +51–84% | +38–54% |
    | Ada002 | +49–91% | +14–60% |
    | Cohere | +37–105% | +19–46% |
    | OpenAI3072 | +17–49% | +6–46% |

    Ranges cover the four thread/overquery combinations. Total build-process time decreased by approximately 4–36% in seven of eight cases; Cohere/JDK 22 increased by 8%.

    The study includes Highway improvements outside #751 and does not isolate the default switch. Graphs/codebooks were built independently, recall was not matched, and timing variation remains.

    Diff: 314 lines (+235 / -79) across 3 files Reviewer: r-devulap Review duration: 4262m
    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 · 314 lines diff across 3 files
    0.40
    Model 2 · Review Depth (DistilBERT)
    Depth Score: 0.17 · 1 substantive comment(s)
    0.17
    Model 3 · Review Timing & Attention
    Session adequacy: 100% · Reviewer familiarity: 35%
    60%
    Bedrock Claude 3 · Risk Narration
    (disconnected)
    Groq
    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.344
    Shallow Review Depth shallow_review_depth
    0.289
    Real PR Conversation Timeline
    1 comments
    "Review active on #751"
    general weight: 0.35
    Reviewers
    Assignees
    Unassigned
    Labels
    risk: low confidence: 60.5% reviewed
    Vouch Risk Breakdown
    AI-powered review risk analysis
    Change Risk
    Change Risk · Model 1 (XGBoost)
    Predicted defect probability (0.00–1.00) based on diff churn, modified sensitive files, and author risk history.
    Score: 40.3% (MEDIUM) · Higher = larger blast radius
    40.3%
    Review Confidence
    Review Confidence · Models 2 & 3
    Scrutiny score (0.00–1.00) combining DistilBERT semantic review depth with reviewer familiarity and session dwell time.
    Score: 60.5% · Lower = rushed or shallow review
    60.5%
    Residual Risk
    Residual Risk · Core Equation
    Residual = Change × (1 − Confidence)
    Unmitigated risk surviving review. ≥ 0.65 triggers an automated re-queue to protect production.
    Score: 15.9% · Safe to merge
    15.9%