[Haskell-cafe] Haskell performance question
Don Stewart
dons at galois.com
Thu Nov 8 15:36:56 EST 2007
dpiponi:
> On Nov 8, 2007 12:16 PM, Don Stewart <dons at galois.com> wrote:
>
> > If you can post the code somewhere, that would be great, with examples
> > of how to reproduce your timings.
>
> The code is exactly what I posted originally (but nore that n is 10
> times larger in the C code). I compiled using ghc -O3 -o test test.hs.
> I timed the resulting executable with unix 'time'. I think I used the
> tiger Intel binary here:
> http://www.haskell.org/ghc/download_ghc_661.html (ghc --version
> reports only "The Glorious...verison 6.6.1", file
> ~/lib/ghc-6.6.1/ghc-6.6.1 reports "Mach-O executable i386".) This was
> all run on a 2.4GHz MacBook Pro with Leopard and 2Gb RAM. Anything
> else you need?
>
> I was investigating the plausibility of implementing something like a
> fluid dynamics solver completely in Haskell. I have some working C
> code so I thought I'd port it. But only if there's a chance of it
> being within a factor of 2 or 3 of the original speed.
Can you start by retrying with flags from the spectral-norm benchmark:
http://shootout.alioth.debian.org/gp4/benchmark.php?test=spectralnorm&lang=ghc&id=0
The interaction with gcc here is quite important, so forcing -fvia-C
will matter.
-- Don
More information about the Haskell-Cafe
mailing list