view tuning.sh @ 57:397089dccb32

Compile with -O2. Add tuning parameters and tuning results script
author Mike Pavone <pavone@retrodev.com>
date Sun, 15 Jul 2012 23:55:29 -0700
parents
children
line wrap: on
line source

#!/bin/sh
echo $@ >> tuningresults.txt
echo >> tuningresults.txt

for file in maps/contest1.map maps/contest2.map maps/contest3.map maps/contest4.map maps/contest5.map maps/contest6.map maps/contest7.map maps/contest8.map; do
	/usr/bin/time -f %E -o tuntiming.txt bin/lifter $@ < $file 2>tunout.txt
	text=`tail -n 6 tunout.txt`
	score=`echo $text | sed 's/.*score: \([0-9]*\).*/\1/'`
	time=`cat tuntiming.txt`
	echo "$file: $score ($time)";
	echo "$file: $score ($time)" >> tuningresults.txt
done