Skip to content

Commit 3aef50a

Browse files
jnthntatumcopybara-github
authored andcommitted
Default to using specialized implementation for some builtins.
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
1 parent f61a4de commit 3aef50a

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

eval/public/cel_options.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -195,7 +195,7 @@ struct InterpreterOptions {
195195
// if they exist.
196196
//
197197
// Currently applies to !_, @not_strictly_false, _==_, _!=_, @in
198-
bool enable_fast_builtins = false;
198+
bool enable_fast_builtins = true;
199199
};
200200
// LINT.ThenChange(//depot/google3/runtime/runtime_options.h)
201201

runtime/runtime_options.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -165,7 +165,7 @@ struct RuntimeOptions {
165165
// if they exist.
166166
//
167167
// Currently applies to !_, @not_strictly_false, _==_, _!=_, @in
168-
bool enable_fast_builtins = false;
168+
bool enable_fast_builtins = true;
169169
};
170170
// LINT.ThenChange(//depot/google3/eval/public/cel_options.h)
171171

0 commit comments

Comments
 (0)