#!/bin/sh # $Id: crunchy.txt,v 1.1.1.1 2003/10/04 16:01:42 karsten Exp $ # compile the test with some simple options, see `info gcc' node # `Optimize Options' and `i386 Options' for arc in i386 i486 i586 i686 ; do for opt in 0 s 1 2 3 ; do echo Compiling -march="$arc" and -O"$opt" gcc -static -mcpu="$arc" -march="$arc" -O"$opt" -o crunch_"$arc"_"$opt" crunch.c done done # run every test 2 times and redirect the output to a file: for arc in i386 i486 i586 i686 ; do for opt in 0 s 1 2 3 ; do echo " " echo Results for -march="$arc" and -O"$opt" time crunch_"$arc"_"$opt" >/dev/null 2>&1 done done > results.txt