Benchmark: count < N without early exit (result is true)
(b *testing.B)
| 253 | |
| 254 | // Benchmark: count < N without early exit (result is true) |
| 255 | func 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) |
| 268 | func BenchmarkCountThresholdLteNoEarlyExit(b *testing.B) { |