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

Function BenchmarkCountThresholdLtNoEarlyExit

optimizer/count_threshold_test.go:255–265  ·  view source on GitHub ↗

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

(b *testing.B)

Source from the content-addressed store, hash-verified

253
254// Benchmark: count < N without early exit (result is true)
255func BenchmarkCountThresholdLtNoEarlyExit(b *testing.B) {
256 // Only 100 elements match (# <= 100), threshold is 200
257 // Must scan entire array, result = true
258 program, _ := expr.Compile(`count(1..10000, # <= 100) < 200`)
259 var out any
260 b.ResetTimer()
261 for n := 0; n < b.N; n++ {
262 out, _ = vm.Run(program, nil)
263 }
264 _ = out
265}
266
267// Benchmark: count <= N without early exit (result is true)
268func BenchmarkCountThresholdLteNoEarlyExit(b *testing.B) {

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…