Skip to content

Leverage rule indexing for CollapseNullStrictValueOverNullValueRule#4260

Open
RobertBrunel wants to merge 1 commit into
FoundationDB:mainfrom
RobertBrunel:CollapseNullStrictValueOverNullValueRule
Open

Leverage rule indexing for CollapseNullStrictValueOverNullValueRule#4260
RobertBrunel wants to merge 1 commit into
FoundationDB:mainfrom
RobertBrunel:CollapseNullStrictValueOverNullValueRule

Conversation

@RobertBrunel

Copy link
Copy Markdown
Contributor

Remove CollapseNullStrictValueOverNullValueRule from the always-rules bucket of DefaultValueSimplificationRuleSet and instead create multiple instances of the rule, one instance per strictly null-propagating subclass Value subclass (such as CastValue, et cetera). To this end, introduce a V type parameter and build a typedMatcherWithPredicate directly for V.class.

This reduces the overhead in trying to match this rule.

Remove `CollapseNullStrictValueOverNullValueRule` from the always-rules bucket of `DefaultValueSimplificationRuleSet` and instead create multiple instances of the rule, one instance per strictly null-propagating subclass `Value` subclass (such as `CastValue`, et cetera). To this end, introduce a `V` type parameter and build a `typedMatcherWithPredicate` directly for `V.class`.

This reduces the overhead in trying to match this rule.
@RobertBrunel RobertBrunel self-assigned this Jun 5, 2026
@RobertBrunel RobertBrunel added the performance Performance issues label Jun 5, 2026
@normen662 normen662 self-requested a review June 5, 2026 14:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

performance Performance issues

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant