You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Prototype bounded multiway marker construction - #22682
Long Boolean chains can leave many intermediate diagrams interned after parsing. We add bounded four-way AND/OR construction and use it to combine adjacent parser operands. Each batch permits 1,024 fused expansions or range intersections, with a shared tuple cache capped at 4,096 entries; remaining work uses balanced binary construction. Combinations with multiple conflict-sensitive roots use the binary path.
Reading the full MTEB lock allocates 104,399 nodes instead of 155,357, with the same 2,879 reachable nodes. Binary-cache entries fall from 241,934 to 74,463, with 1,444 tuple-cache entries. Fewer retained intermediates do not translate into less CPU work: repeated parsing of the longest real MTEB marker is 80.5% slower (95% interval: 78.4% to 83.3%), against an identical-binary control of +0.3%. Cache occupancy alone cannot identify whether tuple work, cache rotation, or fallback causes that slowdown.
This prototype trades runtime for memory. Full MTEB export uses 19.3% less peak RSS but takes 32.2% longer, and the synthetic fork export is 3.3% slower. Neither result is explained by the identical-binary control. Fresh resolution shows no compensating general improvement. An independent 16-block run also reproduced the uv-docs regressions: resolution was 6.0% slower (95% interval: 4.6% to 6.6%) and export was 7.5% slower (3.0% to 13.3%). This implementation should remain experimental.
Workload
Base
Candidate
Paired time change (95% interval)
Peak RSS, base → candidate
Resolve uv docs
52.09 ms
55.85 ms
+6.5% [+2.9, +14.6]
44.8 → 44.8 MiB
Resolve MTEB subset (six conflicting extras)
1048.80 ms
1093.00 ms
+0.4% [-0.9, +4.0]
159.5 → 158.6 MiB
Resolve 32 synthetic conflicting extras
181.12 ms
183.57 ms
+1.7% [-0.5, +3.1]
58.2 → 58.2 MiB
Export uv docs
25.42 ms
27.19 ms
+8.5% [+0.2, +17.3]
30.5 → 30.2 MiB
Export MTEB subset, nvembed
32.90 ms
35.10 ms
+6.2% [-1.6, +10.2]
32.4 → 32.5 MiB
Export synthetic model 00
85.85 ms
88.65 ms
+3.3% [+2.9, +3.6]
40.2 → 39.4 MiB
Export full MTEB lockfile
1034.85 ms
1368.19 ms
+32.2% [+30.7, +33.3]
191.0 → 154.2 MiB
Measurements compare this head with the preserved experimental baseline, c25eaef4348afc32e31bf089f3d97488344b9614, which includes balanced parsing, compact interning, and range normalization. We use the same compiler, profiling profile, and jemalloc allocator on an AMD EPYC-Milan devbox, with each process pinned to one CPU. The table retains all 12 counterbalanced blocks; times and RSS are medians, while percentages are medians of paired ratios. The 95% bootstrap intervals are descriptive and unadjusted. Fresh resolution uses warm metadata offline and includes lockfile serialization. The MTEB resolver case uses six conflicting extras; the full MTEB lock is a separate export workload.
Merging this PR will degrade performance by 13.94%
2 warnings
⚠️6 benchmarks are dominated by system calls
System calls cannot be simulated consistently and are left out of the measure. The reported value understates the real cost. Switch to the Walltime instrument to measure them.
Some benchmarks with significant performance changes were compared across different runner types, so the changes might not come from the code. Run base and head on the same runner type, or use CodSpeed Macro Runners for more stable results.
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
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.
Long Boolean chains can leave many intermediate diagrams interned after parsing. We add bounded four-way AND/OR construction and use it to combine adjacent parser operands. Each batch permits 1,024 fused expansions or range intersections, with a shared tuple cache capped at 4,096 entries; remaining work uses balanced binary construction. Combinations with multiple conflict-sensitive roots use the binary path.
Reading the full MTEB lock allocates 104,399 nodes instead of 155,357, with the same 2,879 reachable nodes. Binary-cache entries fall from 241,934 to 74,463, with 1,444 tuple-cache entries. Fewer retained intermediates do not translate into less CPU work: repeated parsing of the longest real MTEB marker is 80.5% slower (95% interval: 78.4% to 83.3%), against an identical-binary control of +0.3%. Cache occupancy alone cannot identify whether tuple work, cache rotation, or fallback causes that slowdown.
This prototype trades runtime for memory. Full MTEB export uses 19.3% less peak RSS but takes 32.2% longer, and the synthetic fork export is 3.3% slower. Neither result is explained by the identical-binary control. Fresh resolution shows no compensating general improvement. An independent 16-block run also reproduced the uv-docs regressions: resolution was 6.0% slower (95% interval: 4.6% to 6.6%) and export was 7.5% slower (3.0% to 13.3%). This implementation should remain experimental.
Measurements compare this head with the preserved experimental baseline,
c25eaef4348afc32e31bf089f3d97488344b9614, which includes balanced parsing, compact interning, and range normalization. We use the same compiler, profiling profile, and jemalloc allocator on an AMD EPYC-Milan devbox, with each process pinned to one CPU. The table retains all 12 counterbalanced blocks; times and RSS are medians, while percentages are medians of paired ratios. The 95% bootstrap intervals are descriptive and unadjusted. Fresh resolution uses warm metadata offline and includes lockfile serialization. The MTEB resolver case uses six conflicting extras; the full MTEB lock is a separate export workload.All five compared builds produce identical lockfile bytes, package selections, exports, and conflict errors. Raw samples, complete methods, reproducible inputs, and the identical-binary control.
The 150
uv-pep508unit tests and all-target, all-feature package Clippy checks pass.