diff options
author | Anthony Martin <ality@pbrane.org> | 2010-12-15 09:47:13 -0500 |
---|---|---|
committer | Anthony Martin <ality@pbrane.org> | 2010-12-15 09:47:13 -0500 |
commit | d3993337c24d74c4d337a4973d04cec1ff0b3d2a (patch) | |
tree | 3078e32c6c51652fd7d61a850d672dd611a4f094 /test/bench/timing.sh | |
parent | 5a80201721ccfe155c8f59ffaabb5f42c65c34e2 (diff) | |
download | go-d3993337c24d74c4d337a4973d04cec1ff0b3d2a.tar.gz |
test/bench: a couple fixes to timing.sh
- Skip the gccgo tests if we don't have it
- Add -lm so nbody.c will compile
- Pass 2098 to the meteor test (cf. the shootout site)
R=rsc, r, iant
CC=golang-dev
http://codereview.appspot.com/3619042
Committer: Russ Cox <rsc@golang.org>
Diffstat (limited to 'test/bench/timing.sh')
-rwxr-xr-x | test/bench/timing.sh | 24 |
1 files changed, 16 insertions, 8 deletions
diff --git a/test/bench/timing.sh b/test/bench/timing.sh index f94dc88df..fec39182c 100755 --- a/test/bench/timing.sh +++ b/test/bench/timing.sh @@ -8,6 +8,12 @@ set -e eval $(gomake --no-print-directory -f ../../src/Make.inc go-env) PATH=.:$PATH +havegccgo=false +if which gccgo >/dev/null 2>&1 +then + havegccgo=true +fi + mode=run case X"$1" in X-test) @@ -30,8 +36,6 @@ runonly() { fi } - - run() { if [ $mode = test ] then @@ -57,6 +61,10 @@ run() { fi return fi + if ! $havegccgo && echo $1 | grep -q '^gccgo ' + then + return + fi echo -n ' '$1' ' $1 shift @@ -85,7 +93,7 @@ revcomp() { nbody() { runonly echo 'nbody -n 50000000' - run 'gcc -O2 nbody.c' a.out 50000000 + run 'gcc -O2 -lm nbody.c' a.out 50000000 run 'gccgo -O2 nbody.go' a.out -n 50000000 run 'gc nbody' $O.out -n 50000000 run 'gc_B nbody' $O.out -n 50000000 @@ -152,11 +160,11 @@ mandelbrot() { } meteor() { - runonly echo 'meteor 16000' - run 'gcc -O2 meteor-contest.c' a.out - run 'gccgo -O2 meteor-contest.go' a.out - run 'gc meteor-contest' $O.out - run 'gc_B meteor-contest' $O.out + runonly echo 'meteor 2098' + run 'gcc -O2 meteor-contest.c' a.out 2098 + run 'gccgo -O2 meteor-contest.go' a.out -n 2098 + run 'gc meteor-contest' $O.out -n 2098 + run 'gc_B meteor-contest' $O.out -n 2098 } pidigits() { |