public
Last active

  • Download Gist
ride-becnhmark.txt
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
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

Please sign in to comment on this gist.

Something went wrong with that request. Please try again.