~ chicken-core (chicken-5) /tests/runbench.sh
Trap1#!/bin/sh2# runbench.sh - run benchmarks3#4# - Note: this needs a proper shell, so it will not work with plain mingw5# (just the compiler and the Windows shell, without MSYS)67set -e8TEST_DIR=`pwd`9export DYLD_LIBRARY_PATH=${TEST_DIR}/..10export LD_LIBRARY_PATH=${TEST_DIR}/..1112echo1314CHICKEN=../chicken15COMPILE_OPTIONS="-O5 -d0 -disable-interrupts -b"1617if test -n "$MSYSTEM"; then18 CHICKEN="..\\chicken.exe"19 # make compiled tests use proper library on Windows20 cp ../lib*chicken*.dll .21fi2223case `uname -s` in24 *BSD*|*bsd*) timeopts="-c";;25 Darwin) timeopts="";;26 *) timeopts='-f "%E elapsed, %U user, %S system"'27esac2829run()30{31 /usr/bin/time "$timeopts" ./a.out "$1" "$2" "$3"32}3334echo "****************************************"3536compiler_options="-C -Wa,-W"37compile="../csc -w -compiler $CHICKEN -I.. -L.. -include-path .. -o a.out $COMPILE_OPTIONS"38interpret="../csi -n -include-path .."3940echo "======================================== null ... "41$compile null.scm -O542run -:Hd4344echo "======================================== compilation ... "45/usr/bin/time "$timeopts" $compile compiler.scm4647echo "======================================== compiler ... "48run -:Hd4950echo "======================================== slatex ... "51$compile slatex.scm52mkdir -p slatexdir53rm -f slatexdir/*54run5556echo "======================================== grep ... "57$compile sgrep.scm58run compiler.scm5960echo "======================================== fft/boxed ... "61$compile fft.scm62run 2000 1163echo "======================================== fft/unboxed ... "64$compile fft.scm -D unboxed65run 2000 116667echo "======================================== allocation ... "68$compile gobble.scm69run 10000000007071echo "======================================== irregex ... "72/usr/bin/time "$timeopts" $interpret -bnq test-irregex.scm >/dev/null