Repository navigation
refactor: separate compact IN-list pruning threshold from the default cap - #25044
goutamadwant wants to merge 1 commit into
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #25044 +/- ##
==========================================
- Coverage 82.38% 82.38% -0.01%
==========================================
Files 1138 1138
Lines 434309 434333 +24
Branches 434309 434333 +24
==========================================
+ Hits 357803 357822 +19
- Misses 54875 54878 +3
- Partials 21631 21633 +2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
The benchmark does not show a general regression. Most results are flat. The main thing worth investigating is the ~20–44% slowdown for large IN / IN ... NULL evaluation, especially under 256_containers; meanwhile, NOT IN actually gets noticeably faster in several comparable cases. |
ecc90dc to
65f827d
Compare
|
@goutamadwant |
You're right @kosiew there was no new code push. I updated the description with the benchmark investigation; sorry if that wasn't clear. The code is ready for review. I couldn't reproduce the reported large-IN slowdown when comparing the current head and base locally, but a fresh run of those refs on the original GKE runner would help settle the performance concern before merge. let me know! |
|
benchmark run 2 ...faster cases only: |
Which issue does this PR close?
IN-list pruning #24710.Rationale for this change
The compact representation threshold currently reuses
MAX_IN_LIST_SIZE, coupling it to the default maximum eligible list length. These are separate decisions. Small-list performance depends on the statistics batch size and distribution, so this change names the existing boundary independently of the configurable cap without claiming that boundary is universally optimal.What changes are included in this PR?
MIN_COMPACT_IN_LIST_SIZE = 21, preserving the existing strictly-greater-than-20 boundary.INandNOT IN.NOT INcases. Make NULL-result assertions follow the selected representation.This retains the ordered-type compact evaluator from #25012. It does not change the evaluator's algorithm or tune the threshold.
What is the testing strategy for this PR?
Boundary tests cover list sizes 1, 2, 4, 8, 20, and 21 with disabled, below-size, exact-size, and larger caps for both
INandNOT IN. The benchmark checks representation choice and pruning results as well as measuring construction/evaluation.The reported GKE slowdown compared
de602a59e0withd170cbc279, not this refreshed head. The follow-up comparison uses head65f827dae6and its base925d7f8ffd, the same benchmark harness on both, Rust 1.98.1, and separate build targets. It covers 12 large-IN/NULL and NOT-IN control cases, with 50 samples per case and two runs per revision in alternating order after local builds/tests finish.The two-run average differences range from 1.3% faster to 0.6% slower locally. The three highlighted 256-container IN cases differ by approximately -0.23%, -0.17%, and -0.11%. Both revisions pass all 292 cases of the identical benchmark smoke harness. This does not reproduce the reported 20–44% slowdown on the current patch, but a fresh GKE run of these refs is still needed to compare on that hardware. No evaluator change was made in response to the older report.
Are there any user-facing changes?
No. The default cap, representation boundary, pruning behavior, and public APIs remain unchanged. No performance improvement is claimed.