Skip to content

Fuse marker cover subtraction - #22666

Draft
charliermarsh wants to merge 4 commits into
charlie/marker-isopfrom
charlie/marker-cover-subtract
Draft

charliermarsh wants to merge 4 commits into
charlie/marker-isopfrom
charlie/marker-cover-subtract

Conversation

@charliermarsh

Copy link
Copy Markdown
Member

Based on #22651.

We compute the uncovered region directly from a marker cover, adapting EXTRA's fused area/cover operation from section 7.2. Recursive extraction caches the cover without eagerly constructing its function. Subtraction follows shared cofactors and rebuilds each uncovered decision once. Native range merging still materializes a suffix's function when needed to combine equivalent branches.

This is an experiment, not a demonstrated optimization. Against f9df0b826c, repeated conversion with 16 and 32 conflicting extras is 24.5% and 14.6% slower. Small warm conversions are within 3%. We should not merge this version for runtime performance.

Warm medians in microseconds; lower is better. format includes conflict absorption and serialization.

Workload #22651 This PR Time change
Single clause 0.097 0.096 -0.3%
Two clauses 0.428 0.416 -2.9%
Platform-specific Python versions 0.657 0.669 +1.8%
Conflicting extras, 4 1.621 1.955 +20.6%
Conflicting extras, 16 13.284 16.536 +24.5%
Conflicting extras, 32 46.070 52.812 +14.6%
Conflict-dependent formatting, 16 29.356 31.976 +8.9%
Conflict-dependent formatting, 32 107.771 111.237 +3.2%

Fresh-process results are mixed: two-clause conversion improves from 17.2 to 13.8 µs, single-clause conversion regresses from 13.1 to 15.0 µs, and 32-extra conversion regresses from 89.7 to 98.5 µs.

These measurements compare 60031437c4 directly with its parent on a Linux devbox, using three randomized warm cohorts and 200 fresh processes per small case (30 per larger case). An additional CPU confirmed the conflict-heavy regression, though absolute timings varied across cores. These are component measurements, not end-to-end lock timings.

Full 25-case comparison, raw samples, and reproduction scripts.

All 66,044 exhaustive Boolean/range cases render identically to the base. The relevant unit and lock/conflict integration tests pass.

@codspeed

codspeed Bot commented Oct 16, 2026 •

Copy link
Copy Markdown

Merging this PR will degrade performance by 2.43%

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.

Learn more about system calls

See affected benchmarks

⚠️ Base and head ran on different runner types

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.

Learn more about Macro Runners

Open the report in CodSpeed to investigate

⚡ 3 improved benchmarks
❌ 6 regressed benchmarks
✅ 108 untouched benchmarks
⏩ 54 skipped benchmarks1

Warning

Please fix the performance issues or acknowledge them on CodSpeed.

Performance Changes

Mode Benchmark BASE HEAD Efficiency
❌ Walltime marker_to_dnf_conflicting_extras[16] 11 µs 12.3 µs -10.89%
❌ CPU Simulation marker_to_dnf_conflicting_extras[16] 244.3 µs 266.4 µs -8.31%
❌ Walltime marker_to_dnf_conflicting_extras[32] 36.9 µs 39.9 µs -7.46%
❌ CPU Simulation marker_to_dnf_conflicting_extras[32] 761.8 µs 822.4 µs -7.37%
❌ Walltime imbibe_and_format_marker_conflict_dependent[16] 18.4 µs 19.9 µs -7.28%
❌ Walltime imbibe_and_format_marker_environment_only[16] 18.2 µs 19.5 µs -6.95%
⚡ CPU Simulation imbibe_and_format_marker_environment_only[4] 97.5 µs 84.7 µs +15.13%
⚡ CPU Simulation marker_to_dnf_two_clauses 29.9 µs 27.7 µs +7.83%
⚡ Walltime marker_to_dnf_two_clauses 314 ns 294 ns +6.8%

Tip

Investigate this regression by commenting @codspeedbot fix this regression on this PR, or directly use the CodSpeed MCP with your agent.


Comparing charlie/marker-cover-subtract (6003143) with charlie/marker-isop (f9df0b8)

Open in CodSpeed

Footnotes

  1. 54 benchmarks were skipped, so the baseline results were used instead. If they were deleted from the codebase, click here and archive them to remove them from the performance reports. ↩

An error occurred while trying to automatically change base from charlie/marker-isop to charlie/direct-marker-transform October 18, 2026 03:24

This branch was previously deployed

1 inactive deployment
automations — 60031437 Deployed Oct 16, 2026 by charliermarsh via review / security review #51441
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant