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
Use bit sets to simplify large marker DNFs - #22604
We convert decision diagrams to disjunctive normal form (DNF) when rendering markers, then simplify the result by comparing clauses and removing redundant terms. When there are many conflicting extras, the DNF can contain a lot of clauses, and those comparisons can be expensive (see #21954).
This PR makes the comparisons cheaper for larger DNFs. We assign each distinct marker term an integer and represent each clause as a bit set, so we can compare sets instead of repeatedly comparing full marker expressions. We keep the same removal order, since removing one term can affect later comparisons.
For small DNFs, clauses with repeated terms, or expressions that would need a bit-set index larger than 32 MiB, we fall back to the existing simplifier. We also use indexed term lookups for sparse clauses.
(We still build the DNF and perform up to a quadratic number of clause comparisons; #22608 avoids DNF for Boolean operations, while #22615 prevents redundant conflict clauses on environment-only markers.)
CodSpeed comparison against #22615 measures the 25 marker cases in both walltime and simulation. CodSpeed reports different simulation runners (AMD and Intel); the wall-time results have no runner mismatch.
⚠️8 benchmarks spent significant time in system calls
System calls cannot be consistently instrumented, so they are not included in the measure, which understates the real cost. Please switch to the Walltime instrument to accurately measure system calls.
Some benchmarks with significant performance changes were compared across different runtime environments,
which may affect the accuracy of the 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.
Summary
We convert decision diagrams to disjunctive normal form (DNF) when rendering markers, then simplify the result by comparing clauses and removing redundant terms. When there are many conflicting extras, the DNF can contain a lot of clauses, and those comparisons can be expensive (see #21954).
This PR makes the comparisons cheaper for larger DNFs. We assign each distinct marker term an integer and represent each clause as a bit set, so we can compare sets instead of repeatedly comparing full marker expressions. We keep the same removal order, since removing one term can affect later comparisons.
For small DNFs, clauses with repeated terms, or expressions that would need a bit-set index larger than 32 MiB, we fall back to the existing simplifier. We also use indexed term lookups for sparse clauses.
(We still build the DNF and perform up to a quadratic number of clause comparisons; #22608 avoids DNF for Boolean operations, while #22615 prevents redundant conflict clauses on environment-only markers.)
CodSpeed comparison against #22615 measures the 25 marker cases in both walltime and simulation. CodSpeed reports different simulation runners (AMD and Intel); the wall-time results have no runner mismatch.