Use CC for run title.  Add clang. Comment run with gcc -O0.
@@ -62,12 +62,15 @@ runbench () {
base_time=0.01
inputf=
if test -f $bench.expect; then expect_out=$bench.expect; else expect_out=; fi
- run "gcc -O2" "$CC -O2 -Ic-benchmarks -I. $bench.c -lm" "./a.out $arg" "$expect_out" "$inputf" first
- run "gcc -O0" "$CC -O0 -Ic-benchmarks -I. $bench.c -lm" "./a.out $arg" "$expect_out" "$inputf"
+ run "$CC -O2" "$CC -O2 -Ic-benchmarks -I. $bench.c -lm" "./a.out $arg" "$expect_out" "$inputf" first
+ if type clang >/dev/null 2>&1; then
+ run "clang -O2" "clang -O2 -Ic-benchmarks -I. $bench.c -lm" "./a.out $arg" "$expect_out" "$inputf"
+ fi
+# run "$CC -O0" "$CC -O0 -Ic-benchmarks -I. $bench.c -lm" "./a.out $arg" "$expect_out" "$inputf"
run "c2m -eg" "" "./c2m -Ic-benchmarks -I. $bench.c -eg $arg" "$expect_out" "$inputf"
}
-for bench in array binary-trees except funnkuch-reduce hash hash2 heapsort lists matrix method-call mandelbrot nbody sieve spectral-norm strcat
+for bench in array binary-trees except funnkuch-reduce hash hash2 heapsort lists matrix method-call mandelbrot nbody sieve spectral-norm strcat # ackermann fib random
do
b=c-benchmarks/$bench
if test -f $b.arg; then arg=`cat $b.arg`; else arg=; fi
