Skip to content

Commit

Permalink
Benchmark all (#1598)
Browse files Browse the repository at this point in the history
  • Loading branch information
raviqqe authored Sep 28, 2024
1 parent 247a56b commit 0ec7412
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 15 deletions.
3 changes: 0 additions & 3 deletions .github/workflows/bench.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,6 @@ jobs:
os:
- ubuntu-latest
- macos-14
interpreter:
- stak-interpret
- mstak-interpret
options:
-
- -d
Expand Down
1 change: 1 addition & 0 deletions bench/empty/main.py
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

1 change: 1 addition & 0 deletions bench/empty/main.scm
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@

16 changes: 4 additions & 12 deletions tools/bench.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,16 +2,11 @@

set -ex

interpreter=stak-interpret

while getopts di: option; do
while getopts d: option; do
case $option in
d)
build_options=--no-default-features
;;
i)
interpreter=$OPTARG
;;
esac
done

Expand All @@ -23,7 +18,7 @@ fi

brew install chibi-scheme gambit-scheme gauche

cargo install hyperfine mstak-interpret stak-interpret
cargo install hyperfine stak

cd $(dirname $0)/..

Expand All @@ -34,10 +29,7 @@ for directory in . cmd/minimal; do
)
done

baseline=$(which $interpreter)
candidate=$(PATH=$PWD/target/release:$PWD/cmd/minimal/target/release:$PATH which $interpreter)

export PATH=$PWD/target/release:$PATH
export PATH=$PWD/target/release:$PWD/cmd/minimal/target/release:$PATH

filter=.

Expand All @@ -50,7 +42,7 @@ for file in $(find bench -type f -name '*.scm' | sort | grep $filter); do

cat prelude.scm $file | stak-compile >$base.bc

scripts="$baseline $base.bc,$candidate $base.bc,gsi $file,chibi-scheme $file,gosh $file"
scripts="stak $file,mstak $file,stak-interpret $base.bc,mstak-interpret $base.bc,gsi $file,chibi-scheme $file,gosh $file"

if [ -r $base.py ]; then
scripts="$scripts,python3 $base.py"
Expand Down

0 comments on commit 0ec7412

Please sign in to comment.