Add int7(8) bulk vector search micro benchmarks to include dataset larger than typical cache sizes#138384
Merged
ldematte merged 3 commits intoelastic:mainfrom Nov 21, 2025
Merged
Conversation
…rger than typical cache sizes
…nchmarks # Conflicts: # benchmarks/src/main/java/org/elasticsearch/benchmark/vector/scorer/VectorScorerInt7uBenchmark.java # benchmarks/src/test/java/org/elasticsearch/benchmark/vector/scorer/VectorScorerInt7uBenchmarkTests.java
Collaborator
|
Pinging @elastic/es-search-relevance (Team:Search Relevance) |
benwtrent
approved these changes
Nov 20, 2025
Member
benwtrent
left a comment
There was a problem hiding this comment.
Good foundational work. I think this is nice!
Contributor
Author
|
For the record, these are the current numbers on my Apple M2 silicon: Bulk operations currently are not different from their non-bulk counterparts (they just iterate). Not surprising to see that sequential access is from 1.5x faster (for scalar, the slowest method) to 4x faster (for native, the fastest one). Cost of accessing the memory out of order shows more on faster methods, and can become a bottleneck. Can't wait to see if we can optimize Bulk operations! |
ncordon
pushed a commit
to ncordon/elasticsearch
that referenced
this pull request
Nov 26, 2025
…rger than typical cache sizes (elastic#138384) Relates to elastic#138358 Benchmarks scoring operations against multiple vectors, accessing data sequentially or randomly, in an iterative way (for loop) VS using explicit bulk operations(*). The purpose it to highlight memory-level parallelism (or lack thereof), contention, caching issues, and be a measure for potential optimizations. In particular, random-access variants of the benchmarks should show differences wrt linear access and dataset size (fits in L1 cache, in L2 cache, or needs to go to L3/memory). (*) NOTE: at this time, bulk operations are implemented as for loops, so we won't see any difference; optimized implementation of bulk operations will be addressed in a following PR.
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.
Relates to #138358
Benchmarks scoring operations against multiple vectors, accessing data sequentially or randomly, in an iterative way (for loop) VS using explicit bulk operations(*).
The purpose it to highlight memory-level parallelism (or lack thereof), contention, caching issues, and be a measure for potential optimizations. In particular, random-access variants of the benchmarks should show differences wrt linear access and dataset size (fits in L1 cache, in L2 cache, or needs to go to L3/memory).
(*) NOTE: at this time, bulk operations are implemented as for loops, so we won't see any difference; optimized implementation of bulk operations will be addressed in a following PR.