X-Git-Url: http://nitlanguage.org diff --git a/benchmarks/bench_languages.sh b/benchmarks/bench_languages.sh index 8316ab9..2606176 100755 --- a/benchmarks/bench_languages.sh +++ b/benchmarks/bench_languages.sh @@ -57,7 +57,7 @@ function bench_command() # Execute the commands $count times for i in `seq 1 "$count"`; do - /usr/bin/time -f "%U" -o "$timeout" -a "$@" > $outputopts 2>&1 || die "$1: failed" + (ulimit -t 60; /usr/bin/time -f "%U" -o "$timeout" -a "$@") > $outputopts 2>&1 || die "$1: failed" echo -n "$i. " tail -n 1 "$timeout" done @@ -75,7 +75,7 @@ function run_command() { if [ "$dry_run" = "true" ]; then return; fi echo " $ $@" - "$@" || die "$@: failed" + (ulimit -t 180; "$@") || die "$@: failed" } # Check if the test should be skiped according to its name @@ -271,6 +271,12 @@ function bench_typetest_depth() bench_command "$b" "" java -cp "${javadir}/" "${t}_$b" $s done + prepare_res $basedir/$name-gcj.dat "gcj" "gcj" + for b in $seq; do + run_command gcj --main=${t}_$b -O2 "${javadir}/${t}_$b.java" -o "${javadir}/${t}_$b.gcj.bin" + bench_command "$b" "" "${javadir}/${t}_$b.gcj.bin" $s + done + prepare_res $basedir/$name-scala.dat "scala" "scala" scaladir="${basedir}/scala" for b in $seq; do @@ -318,6 +324,27 @@ function bench_typetest_depth() bench_command "$b" "" "$nitdir/${t}_$b.nitg-s.bin" $s done + tg="nitg-s-bm" + prepare_res $nitdir/$name-$tg.dat "$tg" "$tg" + for b in $seq; do + run_command ./nitg $nitdir/${t}_$b.nit --separate --bm-typing -o "$nitdir/${t}_$b.$tg.bin" --make-flags "CFLAGS=\"-g -O2 -DNOBOEHM\"" + bench_command "$b" "" "$nitdir/${t}_$b.$tg.bin" $s + done + + tg="nitg-s-pha" + prepare_res $nitdir/$name-$tg.dat "$tg" "$tg" + for b in $seq; do + run_command ./nitg $nitdir/${t}_$b.nit --separate --phand-typing -o "$nitdir/${t}_$b.$tg.bin" --make-flags "CFLAGS=\"-g -O2 -DNOBOEHM\"" + bench_command "$b" "" "$nitdir/${t}_$b.$tg.bin" $s + done + + tg="nitg-s-phm" + prepare_res $nitdir/$name-$tg.dat "$tg" "$tg" + for b in $seq; do + run_command ./nitg $nitdir/${t}_$b.nit --separate --phmod-typing -o "$nitdir/${t}_$b.$tg.bin" --make-flags "CFLAGS=\"-g -O2 -DNOBOEHM\"" + bench_command "$b" "" "$nitdir/${t}_$b.$tg.bin" $s + done + prepare_res $nitdir/$name-nitg-su.dat "nitg-su" "nitg-su" for b in $seq; do run_command ./nitg $nitdir/${t}_$b.nit --separate --no-check-covariance -o "$nitdir/${t}_$b.nitg-su.bin" --make-flags "CFLAGS=\"-g -O2 -DNOBOEHM\""