[Haskell-cafe] Very fast loops. Now!

Kirsten Chevalier catamorphism at gmail.com
Sat Feb 10 15:25:45 EST 2007


On 2/10/07, Donald Bruce Stewart <dons at cse.unsw.edu.au> wrote:
>
> To everyone's surprise, GHC 6.6 beats GCC (3.3.5) here, at least the two test machines:
>
>
>     $ ghc -O -fexcess-precision -fbang-patterns -optc-O3 -optc-ffast-math -optc-mfpmath=sse -optc-msse2 A.hs -o a
>
>     $ time ./a
>     3.333333
>     ./a  0.96s user 0.01s system 99% cpu 0.969 total
>                                          ^^^^^
>
> Versus gcc 3.3.5:
>
>     $ gcc -O3 -ffast-math -mfpmath=sse -msse2 -std=c99 t.c -o c_loop
>     $ time ./c_loop
>     3.333333
>     ./c_loop  1.01s user 0.01s system 97% cpu 1.046 total
>                                               ^^^^^

There's no doubt that GHC is doing well here, but is that really a
statistically significant difference? Certainly, it's great that GHC
and GCC are doing at least about equally well, but I wouldn't conclude
just from that data that GHC *beats* GCC.

Cheers,
Kirsten

-- 
Kirsten Chevalier* chevalier at alum.wellesley.edu *Often in error, never in doubt
"Ninety-nine percent of everything that is done in the world, good and bad, is
done to pay a mortgage. The world would be a much better place if everyone
rented." -- Christopher Buckley


More information about the Haskell-Cafe mailing list