<div>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.</div>
<div><br></div><div>Anyway it was more of a question. Does GHC perform register allocation (e.g. using graph colouring) and loop unrolling?<br></div><div><div><br><div class="gmail_quote">On Fri, Feb 20, 2009 at 4:22 PM, Colin Paul Adams <span dir="ltr"><<a href="mailto:colin@colina.demon.co.uk">colin@colina.demon.co.uk</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">>>>>> "Peter" == Peter Verswyvelen <<a href="mailto:bugfact@gmail.com">bugfact@gmail.com</a>> writes:<br>
<br>
Peter> So GHC is about 3 to 4 times slower as Visual C++ / GCC<br>
Peter> without loop unrolling, which is not too bad since GHC does<br>
Peter> not perform register optimization and loop unrolling yet<br>
Peter> no?<br>
<br>
I would call it rather poor.<br>
<br>
And I don't accept a since of that form as valid mitigation.<br>
<font color="#888888">--<br>
Colin Adams<br>
Preston Lancashire<br>
</font></blockquote></div><br></div></div>