Skip to content

perf: avoid allocating in binary and/or when possible#8689

Merged
anderseknert merged 1 commit into
open-policy-agent:mainfrom
anderseknert:avoid-empty-set-op-alloc
May 21, 2026
Merged

perf: avoid allocating in binary and/or when possible#8689
anderseknert merged 1 commit into
open-policy-agent:mainfrom
anderseknert:avoid-empty-set-op-alloc

Conversation

@anderseknert
Copy link
Copy Markdown
Member

Avoid allocation in & and | calls when either of the operands is an empty set.

Avoid allocation in `&` and `|` calls when either of the operands is an empty set.

Signed-off-by: Anders Eknert <anders.eknert@apple.com>
@anderseknert anderseknert merged commit d425213 into open-policy-agent:main May 21, 2026
40 checks passed
@anderseknert anderseknert deleted the avoid-empty-set-op-alloc branch May 21, 2026 21:00
@github-actions
Copy link
Copy Markdown

Benchmark Regression Detected

Commit d4252139230e1a2a355b10267e86a58fc7e1fb0b introduced benchmark regressions (threshold: >25% ns/op increase).

Package Benchmark Regression
v1/ast BenchmarkFromBuiltinNames/two_parts-4 +166%
v1/ast BenchmarkNoASTTypeAllocatesOnAppendToBufferOfStringLength/not,_explicit_body,_multi-line-4 +26%
v1/ast BenchmarkFromBuiltinNames/no_match-4 +25%

Benchmarks Dashboard

This comment was automatically generated by the benchmarks workflow.

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