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

Function BenchmarkCountThresholdLteNoEarlyExit

optimizer/count_threshold_test.go:268–278  ·  view source on GitHub ↗

Benchmark: count <= N without early exit (result is true)

(b *testing.B)

Source from the content-addressed store, hash-verified

266
267// Benchmark: count <= N without early exit (result is true)
268func BenchmarkCountThresholdLteNoEarlyExit(b *testing.B) {
269 // Only 100 elements match (# <= 100), threshold is 101
270 // Must scan entire array, result = true
271 program, _ := expr.Compile(`count(1..10000, # <= 100) <= 100`)
272 var out any
273 b.ResetTimer()
274 for n := 0; n < b.N; n++ {
275 out, _ = vm.Run(program, nil)
276 }
277 _ = out
278}

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…