Benchmark: count <= N without early exit (result is true)
(b *testing.B)
| 266 | |
| 267 | // Benchmark: count <= N without early exit (result is true) |
| 268 | func 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 | } |