-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbench.sh
27 lines (22 loc) · 1.03 KB
/
bench.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#!/bin/bash
set -e
npm run build
go build -o ./go/1brc ./go
for measurements_file in $(ls -r measurements*.txt)
do
echo "Running benchmarks for $measurements_file"
hyperfine \
--min-runs 1 \
--warmup 1 \
--parameter-list input_file $measurements_file \
--export-markdown results/comparison_$measurements_file.md \
-n 'python bruteforce {input_file}' 'python python/brute_force.py {input_file}' \
-n 'bun bruteforce {input_file}' 'bun run node/brute-force.ts {input_file}' \
-n 'node bruteforce {input_file}' 'node node/dist/brute-force.js {input_file}' \
-n 'bun v1 {input_file}' 'bun run node/v1.ts {input_file}' \
-n 'python v1 {input_file}' 'python python/v1.py {input_file}' \
-n 'node v1 {input_file}' 'node node/dist/v1.js {input_file}' \
-n 'go brute_force' './go/1brc --file {input_file} --impl brute_force' \
-n 'go track_aggregates' './go/1brc --file {input_file} --impl track_aggregates' \
-n 'go track_aggregates_v2' './go/1brc --file {input_file} --impl track_aggregates_v2'
done