diff options
author | Joshua Haberman <joshua@reverberate.org> | 2011-02-27 14:48:25 -0800 |
---|---|---|
committer | Joshua Haberman <joshua@reverberate.org> | 2011-02-27 14:48:25 -0800 |
commit | 37e1c3102be15f1e57805e828993156e3492d764 (patch) | |
tree | 3a323de7e43703c717b7d0dff251f483de459cd6 /perf-tests.sh | |
parent | 20b2a6bd0d94b987bda9e32f4da1cb00a4bcd00f (diff) |
Use FDO for benchmarks, which gives a 10-15% improvement.
Diffstat (limited to 'perf-tests.sh')
-rwxr-xr-x | perf-tests.sh | 31 |
1 files changed, 16 insertions, 15 deletions
diff --git a/perf-tests.sh b/perf-tests.sh index 003f866..8630182 100755 --- a/perf-tests.sh +++ b/perf-tests.sh @@ -11,24 +11,25 @@ fi rm -f perf-tests.out -if [ x`uname -m` = xx86_64 ]; then +run_with_flags () { + FLAGS=$1 + NAME=$2 + make clean - echo "-DNDEBUG -m32" > perf-cppflags + echo "$FLAGS -fprofile-generate" > perf-cppflags make upb_benchmarks - make benchmark | sed -e 's/^/plain32./g' | tee -a perf-tests.out + make benchmark - make clean - echo "-DNDEBUG -fomit-frame-pointer -m32" > perf-cppflags + make clean_leave_profile + echo "$FLAGS -fprofile-use" > perf-cppflags make upb_benchmarks - make benchmark | sed -e 's/^/omitfp32./g' | tee -a perf-tests.out -fi + make benchmark | sed -e "s/^/$NAME./g" | tee -a perf-tests.out +} -make clean -echo "-DNDEBUG" > perf-cppflags -make $MAKETARGET -make benchmark | sed -e 's/^/plain./g' | tee -a perf-tests.out +if [ x`uname -m` = xx86_64 ]; then + run_with_flags "-DNDEBUG -m32" "plain32" + run_with_flags "-DNDEBUG -fomit-frame-pointer -m32" "omitfp32" +fi -make clean -echo "-DNDEBUG -fomit-frame-pointer" > perf-cppflags -make $MAKETARGET -make benchmark | sed -e 's/^/omitfp./g' | tee -a perf-tests.out +run_with_flags "-DNDEBUG " "plain" +run_with_flags "-DNDEBUG -fomit-frame-pointer" "omitfp" |