Well, it would be meaningful for your own experience in learning Haskell. Some time ago somebody took a shot at nbodies using pure immutable structures, and as I recall, got within about 4x the performance of mutable structures. In 6.6, an STArray based approach was maybe 2x slower, but by now it may well be comparable, as Dons pointed out. In fact, lots of the shootout entries could use an overhaul now that 6.8 is running on their machines, as plenty of older, uglier, optimizations are probably preformed as efficiently if not more so by the newer GHC, whose strictness analysis, for example, is consistently and pleasantly surprising.<br>
<br>If you take a stab at some of these benchmarks, with some helpful guidance from #haskell, you&#39;ll no doubt get a much better sense of how memory and performance works in haskell, and which tweaks are just there for the last 2%. So even if you can&#39;t beat the current winners (and given the compiler changes, you may well be able to) you&#39;ll still come out ahead in the process.<br>
<br>As for the clean entry though, it no doubt relies heavily on uniqueness typing and so is secretly mutating like crazy under the hood.<br><br>Cheers,<br>S.<br><br><div class="gmail_quote">On Tue, May 13, 2008 at 12:26 AM, J C &lt;<a href="mailto:jhc0033@gmail.com">jhc0033@gmail.com</a>&gt; wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><div class="Ih2E3d">On Mon, May 12, 2008 at 4:38 AM, Richard Kelsall<br>
&lt;<a href="mailto:r.kelsall@millstream.com">r.kelsall@millstream.com</a>&gt; wrote:<br>
<br>
&gt; &nbsp;Hello JC, I think you&#39;ve set yourself a challenge there :) Welcome to<br>
&gt; &nbsp;Haskell programming. Taking a Shootout entry and playing with it is<br>
&gt; &nbsp;a great way to learn Haskell. The Shootout provides an example in your<br>
&gt; &nbsp;favourite previous language for comparison and a small well defined<br>
&gt; &nbsp;program with exact test results you can pit your wits against. Fame<br>
&gt; &nbsp;awaits you for a fast and beautiful entry. I&#39;m still learning useful<br>
&gt; &nbsp;things from the Fasta benchmark. It&#39;s surprising how many interesting<br>
&gt; &nbsp;things you can discover in a small piece of code.<br>
<br>
</div>It may be fun, but I don&#39;t think it would be meaningful. My code will<br>
be, most likely, slow, leaving some doubt as to whether it&#39;s slow<br>
because of the limitations of the compiler or my inexperience.<br>
<br>
On the other hand, if the experts can&#39;t help using malloc, unsafe*,<br>
global mutables and IO, I&#39;ll be able to conclude that this is probably<br>
what it takes to make Haskell run fast :-(<br>
<div><div></div><div class="Wj3C7c">_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
</div></div></blockquote></div><br>