
Well C# does it with a for loop in 2300ms, and when using a IEnumerable
sequence it needs 19936ms. Very much like the Haskell code. But of course
the Haskell code could optimize the sum I guess, I assume it is using the
lazy version of sum by default.
Anyway it was more of a question. Does GHC perform register allocation (e.g.
using graph colouring) and loop unrolling?
On Fri, Feb 20, 2009 at 4:22 PM, Colin Paul Adams
"Peter" == Peter Verswyvelen
writes: Peter> So GHC is about 3 to 4 times slower as Visual C++ / GCC Peter> without loop unrolling, which is not too bad since GHC does Peter> not perform register optimization and loop unrolling yet Peter> no?
I would call it rather poor.
And I don't accept a since of that form as valid mitigation. -- Colin Adams Preston Lancashire