Benchmarks for count > 0 → any
(b *testing.B)
| 115 | |
| 116 | // Benchmarks for count > 0 → any |
| 117 | func BenchmarkCountGtZero(b *testing.B) { |
| 118 | program, _ := expr.Compile(`count(1..1000, # == 1) > 0`) |
| 119 | var out any |
| 120 | b.ResetTimer() |
| 121 | for n := 0; n < b.N; n++ { |
| 122 | out, _ = vm.Run(program, nil) |
| 123 | } |
| 124 | _ = out |
| 125 | } |
| 126 | |
| 127 | func BenchmarkCountGtZeroLargeEarlyMatch(b *testing.B) { |
| 128 | program, _ := expr.Compile(`count(1..10000, # == 1) > 0`) |