Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Set membership test rewriting optimizer #865

Merged
merged 3 commits into from
Dec 5, 2023

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
ext/sets_test.go Show resolved Hide resolved
@TristonianJones TristonianJones merged commit 52e5dcc into google:master Dec 5, 2023
2 checks passed
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