File tree 1 file changed +17
-0
lines changed
1 file changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -156,6 +156,23 @@ output:
156
156
]
157
157
```
158
158
159
+ ## Benchmark
160
+
161
+ ``` sh
162
+ ❯ hyperfine -N --warmup 10 ' rjq --load="test.json" --query="salary < 15000 && score < 2.0 && verified = false"' " jq '.[] | select(.salary<15000 and .score<2.0 and .verified==false)' test.json"
163
+ Benchmark 1: rjq --load=" test.json" --query=" salary < 15000 && score < 2.0 && verified = false"
164
+ Time (mean ± σ): 163.0 ms ± 0.9 ms [User: 125.6 ms, System: 37.1 ms]
165
+ Range (min … max): 161.9 ms … 164.8 ms 18 runs
166
+
167
+ Benchmark 2: jq ' .[] | select(.salary<15000 and .score<2.0 and .verified==false)' test.json
168
+ Time (mean ± σ): 332.3 ms ± 2.1 ms [User: 306.4 ms, System: 25.6 ms]
169
+ Range (min … max): 328.9 ms … 335.8 ms 10 runs
170
+
171
+ Summary
172
+ ' rjq --load="test.json" --query="salary < 15000 && score < 2.0 && verified = false"' ran
173
+ 2.04 ± 0.02 times faster than ' jq ' .[] | select(.salary< 15000 and .score< 2.0 and .verified==false)' test.json'
174
+ ```
175
+
159
176
## Author
160
177
161
178
👤 ** Mainak Bhattacharjee**
You can’t perform that action at this time.
0 commit comments