perf(ivfpq): speed up transposed PQ8 scans - #76
Merged
Conversation
jerry-024
force-pushed
the
perf/ivfpq-sparse-scan-quarter
branch
from
August 13, 2026 02:12
cc8fde5 to
c80295a
Compare
shyjsarah
reviewed
Aug 13, 2026
| fn main() { | ||
| assert_eq!((NQ, NPROBE), (64, 64), "benchmark production query shape"); | ||
| assert!( | ||
| std::env::var_os("PAIMON_VINDEX_LOG_IVFPQ_TIMING").is_none(), |
Contributor
There was a problem hiding this comment.
This guard checks a stale environment variable name. The exercised search path currently reads PAIMON_VINDEX_LOG_IVFPQ_BATCH_TIMING and PAIMON_VINDEX_LOG_IVFPQ_BATCH_REUSE, so enabling either diagnostic still passes this assertion and can add instrumentation/logging overhead to the measured samples. Could we assert that both current variables are unset before running the benchmark?
jerry-024
marked this pull request as ready for review
August 13, 2026 07:05
Contributor
|
+1 |
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
Speed up transposed 8-bit IVF-PQ scans by exposing each 256-entry lookup table as a fixed-size array, allowing the compiler to eliminate bounds checks in the hot loop. Search results and the existing 12.5% sparse/dense crossover remain unchanged.
Changes
nq=64,nprobe=64).Testing
cargo fmt --all --checkcargo check -p paimon-vindex-core --tests --target x86_64-unknown-linux-gnucargo clippy -p paimon-vindex-core --benches --target x86_64-unknown-linux-gnu -- -D warningsSingle-thread benchmark on the same SSH development host:
Historical scalar results on the same host and shape were 1890.700 ms at 50% density and 1849.500 ms at 100%, directional improvements of 43.3% and 42.3%. These were not interleaved A/B runs; production impact still needs a Spark run on the target AMD executor.
Notes