perf(fts): accelerate wide and queries with bulk intersection - #9030
Open
BubbleCal wants to merge 1 commit into
Open
perf(fts): accelerate wide and queries with bulk intersection#9030BubbleCal wants to merge 1 commit into
BubbleCal wants to merge 1 commit into
Conversation
Enable full bulk AND for modern wider conjunctions and intersect zero-floor windows using bounded pairwise SIMD/scalar kernels. Recover offsets only for surviving DocIDs while preserving scoring and compatibility paths. Add exact-result coverage across block boundaries and dataset fragments.
BubbleCal
force-pushed
the
yang/fts-underfilled-and-lazy-decode
branch
from
September 7, 2026 05:11
5400136 to
0181df1
Compare
This was referenced Sep 7, 2026
Contributor
There was a problem hiding this comment.
After the restack, this PR is correctly scoped to wide modern conjunction routing and pairwise block intersection while preserving exact membership, phrase and visibility handling, score bits, and dataset-level behavior. The remaining risk is performance reproducibility: the reported incremental baseline is production-equivalent to the current base, but the benchmark driver and raw evidence are absent from this tree, and 8 of 15 short-query controls show roughly 0.6–2.2% median regressions. LANCE_FTS_BULK_AND=off provides a runtime rollback if production latency buckets regress. No further change is requested for this pull request.
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.
Wide root Match AND queries still spend substantial time in per-document iterator advancement. This PR enables the existing bulk scoring route for four or more modern block-256, non-grouped clauses, and adds bounded pairwise SIMD/scalar DocID intersection before the competitive floor becomes positive. Posting offsets are recovered only for final survivors; positive-floor scoring retains the existing bulk implementation.
Ordinary root Match AND queries directly use
Wand.search. CompoundWandCursorcontinues to use the classic path covered by #9033. The separate Boolean MUST-child floor-propagation change in #9015 is not included.Measurements
The comparison is incremental, from
85ec700bb4aacbc4e87f826f93fe7bc78fe53e41to measured candidate02c5f5a73fb29a47a0ff33293936e38c8f90c470. The current stacked tip,0181df1136be876a04b327f24a0f1a4709263b58, has identical production code; subsequent changes only deduplicate tests and exclude benchmark files. The parent stack layer likewise retains the measured baseline's production code. These measurements establish the final bulk-routing/intersection increment, not the combined stack's speedup versusmain.Lower latency is better; benefit is baseline/current. Same AWS
c7i.8xlarge, Xeon Platinum 8488C, Ubuntu 24.04, Rust 1.97.0/clang 18, repositoryrelease-with-debugwith thin LTO and configured Haswell/AVX2 target. Both versions use Auto mode, CPU 2, one query in flight,LANCE_CPU_THREADS=1, andRAYON_NUM_THREADS=1.The complete comparison contains 42 frozen cases: 65,536-document scaling/additional-distribution corpora and a 131,072-document control corpus. All use
k=10, V3/block256, no positions/filter, and fully resident prewarm. High-hit scaling holds the intersection and each term's DF at 32,768 across term counts. Four independent processes per version/case run in ABBAABBA order, each with 2 s warmup, 5 s measurement, and 30 samples. Values are the median of four run medians. Independent scoring oracles and exact row/score-bit signatures passed.Eight of 15 short-query controls show observed median regressions of approximately 0.6–2.2%. Some baseline runs have wider between-process spread; these are descriptive repeated measurements, not significance claims. Results cover warm index-query CPU work, not a 2.86B-row production or end-to-end dataset workload. Combined performance versus
mainremains unverified. Benchmark drivers and raw evidence are archived separately; no benchmark files are included in this stack.Validation
Stack, 4/4: #9031 → #9032 → #9033 → this PR. Base: #9033.
Merge in stack order; retarget/restack the remaining PRs after their parent merges.