summaryrefslogtreecommitdiff
path: root/perf-tests.sh
blob: 1d8f4a8d2e5639dbf18132f28167bfa03f9ab4ca (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
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 "-O3 -DNDEBUG -msse3" > perf-cppflags
make $MAKETARGET
make benchmark | sed -e 's/^/plain./g' | tee -a perf-tests.out

make clean
echo "-O3 -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 "-O3 -DNDEBUG -msse3 -m32" > perf-cppflags
  make upb_benchmarks
  make benchmark | sed -e 's/^/plain32./g' | tee -a perf-tests.out

  make clean
  echo "-O3 -DNDEBUG -fomit-frame-pointer -msse3 -m32" > perf-cppflags
  make upb_benchmarks
  make benchmark | sed -e 's/^/omitfp32./g' | tee -a perf-tests.out
fi

generated by cgit on debian on lair
contact matthew@masot.net with questions or feedback