Created
February 6, 2011 18:53
-
-
Save rgrig/813603 to your computer and use it in GitHub Desktop.
Summary of Hoodlum's solutions to http://code.google.com/codejam/contest/dashboard?c=433101#s=p2
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
solution time [s] memory [bytes] | |
peter.hs .163 7479296 | |
radu.hs .160 7495680 | |
duncan.hs 176.97 7467008 | |
tim.hs .160 7471104 Files out and out.ref differ | |
nicolas.lhs .460 19001344 Files out and out.ref differ | |
lennart.hs 2134.98 7467008 Files out and out.ref differ | |
This was run in /dev/shm (that is, not using the HDD) on a computer with two cores at 4788 bogomips each (Intel i3 @2.4GHz), and 4GB of RAM. | |
Script used (rather ugly): | |
#!/bin/bash | |
N=100 # N=5 for duncan.hs and lennart.hs | |
ghc --make -O -fforce-recomp $1 -o ride 2> /dev/null | |
strip ride | |
T=0 | |
for i in `seq 1 $N`; do | |
/usr/bin/time -f '%e' ./ride < C-large-practice.in > out 2> t | |
T=$(echo "$T+$(cat t)" | bc -l) | |
done | |
T=$(echo "scale=3; $T / $N" | bc -l) | |
R=$(diff -q out out.ref) | |
valgrind --tool=massif --pages-as-heap=yes --massif-out-file=mem ./ride < C-large-practice.in > out 2> /dev/null | |
M=$(grep mem_heap_B= mem | awk -F '=' '{if (n < $2) n=$2} END{print n}') | |
echo $1 $T $M $R |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment