MCPcopy Create free account
hub / github.com/expr-lang/expr / BenchmarkCountGteOneEarlyMatch

Function BenchmarkCountGteOneEarlyMatch

optimizer/count_any_test.go:148–156  ·  view source on GitHub ↗

Benchmarks for count >= 1 → any

(b *testing.B)

Source from the content-addressed store, hash-verified

146
147// Benchmarks for count >= 1 → any
148func BenchmarkCountGteOneEarlyMatch(b *testing.B) {
149 program, _ := expr.Compile(`count(1..1000, # == 1) >= 1`)
150 var out any
151 b.ResetTimer()
152 for n := 0; n < b.N; n++ {
153 out, _ = vm.Run(program, nil)
154 }
155 _ = out
156}
157
158func BenchmarkCountGteOneNoMatch(b *testing.B) {
159 program, _ := expr.Compile(`count(1..1000, # == 0) >= 1`)

Callers

nothing calls this directly

Calls 2

CompileFunction · 0.92
RunFunction · 0.92

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…