On Tue, May 01, 2007 at 01:59:01PM +0200, Federico Squartini wrote:
> I was reading an old post where Hal Daume III was analyzing Haskell
> performance for arrays.
> He proposed a test program which initializes an array, reverse it a number
> of times, and sums the contents.
> 
> So I wrote a c++ reference program, a naive haskell version using lists and
> I also tweaked a little bit with the IOArray version, which should be the
> fastest. Unfortunately there is a  huge performance gap. Haskell is slower
> by a factor of ten, even when using imperative style.

I'd recommend using -O2 or -O.  GHC doesn't even try to generate fast
code if you don't use them. 

Stefan
_______________________________________________
Haskell mailing list
Haskell@haskell.org
http://www.haskell.org/mailman/listinfo/haskell

Reply via email to