Add bench script
This commit is contained in:
parent
1946b24531
commit
8a7f05acda
2
Cargo.lock
generated
2
Cargo.lock
generated
@ -316,7 +316,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "dust-lang"
|
name = "dust-lang"
|
||||||
version = "0.3.7"
|
version = "0.3.8"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"ansi_term",
|
"ansi_term",
|
||||||
"cc",
|
"cc",
|
||||||
|
16
scripts/bench.fish
Normal file
16
scripts/bench.fish
Normal file
@ -0,0 +1,16 @@
|
|||||||
|
# This script is has the following prerequisites (aside from fish):
|
||||||
|
# - hyperfine
|
||||||
|
# - dust (can be installed with "cargo install dust-lang")
|
||||||
|
# - jq
|
||||||
|
# - nodejs
|
||||||
|
# - nushell
|
||||||
|
# - dielectron.json (can be downloaded from https://opendata.cern.ch/record/304)
|
||||||
|
|
||||||
|
hyperfine
|
||||||
|
--shell none
|
||||||
|
--parameter-list data_path examples/assets/seaCreatures.json,examples/assets/jq_data.json,dielectron.json
|
||||||
|
--warmup 3
|
||||||
|
"dust -c '(length (from_json input))' -p {data_path}"
|
||||||
|
"jq 'length' {data_path}"
|
||||||
|
"node --eval \"require('node:fs').readFile('{data_path}', (err, data)=>{console.log(JSON.parse(data).length)})\""
|
||||||
|
"nu -c 'open {data_path} | length'"
|
Loading…
Reference in New Issue
Block a user