perf(fts): defer decoding for underfilled conjunctions - #9031
Open
BubbleCal wants to merge 1 commit into
Open
Conversation
Separate posting DocIDs from frequency decoding and defer score-bound work until a competitive floor exists. Avoid document-length loads for partitions that cannot satisfy required tokens. Use full-u32-domain SIMD catch-up for the existing classic four/five-clause path.
Contributor
There was a problem hiding this comment.
The lazy, block-granular decoder addresses the real underfilled-AND cost without changing the posting format, and the current coverage preserves classic/bulk, phrase, tail, score, and full-u32 behavior. The residual risk is evaluation: this layer has no isolated base-to-head benchmark, while the linked #9030 measurements cover a later stacked increment, so net latency and possible regressions outside underfilled conjunctions remain unquantified. No change is requested for this 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.
Before a competitive floor exists, AND queries still decoded frequencies and prepared bounds while looking for intersections. This PR keeps that work lazy, particularly when the final intersection has fewer than
kmatches.u32DocID range and a binary-search fallback without AVX2.Tests cover empty/underfilled intersections, delayed frequency and bound activation, block/tail transitions, required-token misses, and scalar/SIMD boundary behavior. Code and its regression tests stay together in this PR.
No isolated
mainA/B measurement is claimed for this layer. The later bulk-intersection measurements belong to #9030.Validation
Stack, 1/4: this PR → #9032 → #9033 → #9030. Base:
main.Merge in stack order; retarget/restack the remaining PRs after their parent merges.