2023-12-27 04:30:33 +00:00
|
|
|
#!/usr/bin/fish
|
2023-12-18 20:35:04 +00:00
|
|
|
# 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)
|
|
|
|
|
2023-12-27 04:30:33 +00:00
|
|
|
hyperfine \
|
|
|
|
--shell none \
|
2024-01-24 23:57:36 +00:00
|
|
|
--parameter-list data_path examples/assets/seaCreatures.json \
|
2023-12-27 04:30:33 +00:00
|
|
|
--warmup 3 \
|
2024-01-24 23:57:36 +00:00
|
|
|
"dust -c 'length(json:parse(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'"
|
|
|
|
|
|
|
|
hyperfine \
|
|
|
|
--shell none \
|
|
|
|
--parameter-list data_path examples/assets/jq_data.json \
|
|
|
|
--warmup 3 \
|
|
|
|
"dust -c 'length(json:parse(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'"
|
|
|
|
|
|
|
|
hyperfine \
|
|
|
|
--shell none \
|
|
|
|
--parameter-list data_path dielectron.json \
|
|
|
|
--warmup 3 \
|
|
|
|
"dust -c 'length(json:parse(input))' -p {data_path}" \
|
2023-12-27 04:30:33 +00:00
|
|
|
"jq 'length' {data_path}" \
|
|
|
|
"node --eval \"require('node:fs').readFile('{data_path}', (err, data)=>{console.log(JSON.parse(data).length)})\"" \
|
2023-12-18 20:35:04 +00:00
|
|
|
"nu -c 'open {data_path} | length'"
|