Skip to content

Set membership test rewriting optimizer#865

Merged
TristonianJones merged 3 commits intogoogle:masterfrom
TristonianJones:in-optimizer
Dec 5, 2023
Merged

Set membership test rewriting optimizer#865
TristonianJones merged 3 commits intogoogle:masterfrom
TristonianJones:in-optimizer

Conversation

@TristonianJones
Copy link
Collaborator

Translates expressions like a in [1, 2, 3] to a in {1: true, 2: true, 3: true}

The benefit of this change is that most of the set relationship operations over lists
are O(n) where n represents the number of elements in the list. The cel.OptOptimize
flag will perform a similar optimization at runtime; however, this optimizer performs
the optimization at compile time.

l46kok
l46kok previously approved these changes Nov 30, 2023
@TristonianJones TristonianJones merged commit 52e5dcc into google:master Dec 5, 2023
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.

2 participants