Skip to content

Commit

Permalink
Default to using specialized implementation for some builtins.
Browse files Browse the repository at this point in the history
Applies to !/@not_strictly_false/==/!=/@in.

This avoids some of the overhead for function dispatch at the cost of duplicating a subset of that logic and restricting the ability to customize them.

Note: the fast builtins assume heterogeneous equality behavior. If not enabled, the runtime will fall back to the provided equals functions, instead of the new builtins step.
PiperOrigin-RevId: 717979767
  • Loading branch information
jnthntatum authored and copybara-github committed Jan 21, 2025
1 parent f61a4de commit 3aef50a
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion eval/public/cel_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -195,7 +195,7 @@ struct InterpreterOptions {
// if they exist.
//
// Currently applies to !_, @not_strictly_false, _==_, _!=_, @in
bool enable_fast_builtins = false;
bool enable_fast_builtins = true;
};
// LINT.ThenChange(//depot/google3/runtime/runtime_options.h)

Expand Down
2 changes: 1 addition & 1 deletion runtime/runtime_options.h
Original file line number Diff line number Diff line change
Expand Up @@ -165,7 +165,7 @@ struct RuntimeOptions {
// if they exist.
//
// Currently applies to !_, @not_strictly_false, _==_, _!=_, @in
bool enable_fast_builtins = false;
bool enable_fast_builtins = true;
};
// LINT.ThenChange(//depot/google3/eval/public/cel_options.h)

Expand Down

0 comments on commit 3aef50a

Please sign in to comment.