Y
Hacker News
new
|
ask
|
show
|
jobs
by
IshKebab
118 days ago
Right but "guaranteed to terminate" is not a useful property. You could write a program that terminates... after a billion years.
1 comments
dilyevsky
118 days ago
You can estimate cost of CEL program using static analysis before running it. "estimate" only because size of runtime data is generally unknown (but obv you could limit that).
link
IshKebab
118 days ago
"You can" - in theory, or does this actually exist?
link
dilyevsky
118 days ago
https://pkg.go.dev/github.com/google/cel-go/cel#Env.Estimate...
link
akshayshah
117 days ago
There’s a whole section on this on TFA:
https://celbyexample.com/execution-cost/
link
AlecBG
118 days ago
With certain macros disabled like .map the runtime is O(code length)!
link