diff options
author | Joshua Haberman <joshua@reverberate.org> | 2009-08-04 22:06:02 -0700 |
---|---|---|
committer | Joshua Haberman <joshua@reverberate.org> | 2009-08-04 22:06:02 -0700 |
commit | 306bc554c67c23ddd52e5ece0e3971214b2da4e7 (patch) | |
tree | 898406cd3264ee2d001d334cd2b81922cbd23330 /perf-tests.sh | |
parent | 1733b582579927379bc04a5838add06b76ada427 (diff) |
More work on benchmarks (performance tests).
Diffstat (limited to 'perf-tests.sh')
-rwxr-xr-x | perf-tests.sh | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/perf-tests.sh b/perf-tests.sh new file mode 100755 index 0000000..28873f2 --- /dev/null +++ b/perf-tests.sh @@ -0,0 +1,34 @@ +#!/bin/sh +# Builds and runs all available benchmarks. The tree will be built +# multiple times with a few different compiler flag combinations. +# The output will be dumped to stdout and to perf-tests.out. + +MAKETARGET=benchmarks +if [ x$1 == xupb ]; then + MAKETARGET=upb_benchmarks +fi + +rm -f perf-tests.out + +make clean +echo "-DNDEBUG -msse3" > perf-cppflags +make $MAKETARGET +make benchmark | sed -e 's/^/plain./g' | tee -a perf-tests.out + +make clean +echo "-DNDEBUG -fomit-frame-pointer -msse3" > perf-cppflags +make $MAKETARGET +make benchmark | sed -e 's/^/omitfp./g' | tee -a perf-tests.out + +if [ x`uname -m` == xx86_64 ]; then + make clean + echo "-DNDEBUG -msse3 -m32" > perf-cppflags + make upb_benchmarks + make benchmark | sed -e 's/^/plain32./g' | tee -a perf-tests.out + + make clean + echo "-DNDEBUG -fomit-frame-pointer -msse3 -m32" > perf-cppflags + make upb_benchmarks + make benchmark | sed -e 's/^/omitfp32./g' | tee -a perf-tests.out +fi + |