We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cffbb1f commit 1888db0Copy full SHA for 1888db0
bench_test.go
@@ -98,6 +98,25 @@ func Benchmark_filter(b *testing.B) {
98
}
99
100
101
+func Benchmark_len(b *testing.B) {
102
+ program, err := expr.Compile(`len(1..100)`)
103
+ if err != nil {
104
+ b.Fatal(err)
105
+ }
106
+
107
+ var out interface{}
108
+ for n := 0; n < b.N; n++ {
109
+ out, err = vm.Run(program, nil)
110
111
112
113
114
115
+ if out.(int) != 100 {
116
+ b.Fail()
117
118
+}
119
120
func Benchmark_access(b *testing.B) {
121
type Price struct {
122
Value int
0 commit comments