Repository navigation
Prefer Google Highway native SIMD by default - #751
Merged
Merged
Conversation
Contributor
|
Before you submit for review:
If you did not complete any of these, then please explain below. |
tlwillke
marked this pull request as ready for review
October 12, 2026 22:50
tlwillke
requested review from
MarkWolters,
ashkrisk and
jshook
as code owners
October 12, 2026 22:50
r-devulap
approved these changes
Oct 13, 2026
r-devulap
left a comment
Contributor
There was a problem hiding this comment.
LGTM. FYI, There are 5 kernels (hamming distance, min, max, sub and scale) that are currently in Panama but not in native, we should port them to native for the sake of completeness even though they never showed up as hotspots. I will have a PR out for that shortly.
Contributor
|
See #753 |
MarkWolters
requested changes
Oct 13, 2026
MarkWolters
left a comment
Contributor
There was a problem hiding this comment.
Willing to consider approval but at the least the exception handling strategy for failure to load the native library needs to be discussed.
Closed
Closed
MarkWolters
approved these changes
Oct 15, 2026
MarkWolters
left a comment
Contributor
There was a problem hiding this comment.
Looks good, thanks for adding the check in the constructor
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
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
-Djvector.enable_native_vectorization=false. The deprecated experimental alias remains supported; the new property wins. Explicit provider selection takes precedence over both.MemorySegmentVectorFloat. UseVectorFloatandFloatArray.array()instead of concrete array casts.copyFromsupports both built-in storage types; native arithmetic still requires provider-created vectors.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
c0095f06combined with main8c33f97a. Native tests used the rebuilt library.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.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.