
dpiponi:
On Nov 8, 2007 11:34 AM, Jason Dusek
wrote: Can you show us your compilation options and timings?
I was simply using -O3. I tried a bunch of other flags (copied from the shootout examples) but they made no appreciable difference.
Argh, -O2 please. -O3 does nothing more, and sometime does less, depending on the compiler :) Double math always needs the gcc backend, and -optc flags (see the spectral-norm post).
I was getting about 1.5s for the Haskell program and about 0.08s for the C one with the same n=10,000,000.
I'm sure we can do better than that!
I now see that my ghc is in fact an i386 build whose binary was downloaded from the ghc binary web page. So I'm going to try to make a better comparison with a 64 bit 6.8.1. The batteries on my laptop will probably drop to zero before then however, so it'll be tomorrow at the earliest.
If you can post the code somewhere, that would be great, with examples of how to reproduce your timings. -- don