Skip to content

Commit

Permalink
update run script
Browse files Browse the repository at this point in the history
  • Loading branch information
bddicken committed Dec 18, 2024
1 parent e2fd9a7 commit 9fa755b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions run.sh
Original file line number Diff line number Diff line change
@@ -1,12 +1,14 @@
function run {
if [ -f ${3} ]; then
if [ -f ${3} ] || [ -f ${4} ]; then
echo ""
echo "Benchmarking $1"
input=`cat input.txt`
hyperfine -i --shell=none --runs 3 --warmup 2 "${2} ${3} ${input}" | sed 's/\(.\{80\}\).*/\1.../'
fi
}

run "Java" "java" "jvm/code" "jvm/code.class"
run "Go" "" "./go/code"
run "Zig" "" "./zig/code"
run "C" "" "./c/code"
run "Rust" "" "./rust/target/release/code"
Expand All @@ -24,8 +26,6 @@ run "Deno (jitless)" "deno --v8-flags=--jitless" "./js/code.js"
run "Deno" "deno" "./js/code.js"
run "PyPy" "pypy" "./py/code.py"
run "CPP" "" "./cpp/code"
run "Go" "" "./go/code"
run "Java" "java" "jvm/code"
run "Scala" "" "./scala/code"
run "Scala-Native" "" "./scala/code-native"
run "PHP JIT" "php -dopcache.enable_cli=1 -dopcache.jit=on -dopcache.jit_buffer_size=64M" "./php/code.php"
Expand Down

0 comments on commit 9fa755b

Please sign in to comment.