Before Haskell took off with parallelism, it was assumed that Haskell would be trivial to run concurrently on cores because majority of Haskell programs were pure, so you could simply run different functions on different cores and string the results together when your done<div>
<br>It turned out that using such a naive method created massive overhead (to the point where it wasn&#39;t worth it), and so different concurrent paradigms were introduced into Haskell to provide parallelism (nested data structures, parallel strategies, collections, STM). In I believe almost every case for these algorithms, there is a compromise between ease of implementation vs performance gains.</div>
<div><br></div><div>Haskell is still by far one of the best languages to deal with concurrency/parallelism. In most other conventional languages used today (with are imperative or multi-paradigm), parallelism breaks modularity/abstraction (which is one of the main reasons why most desktop applications/games are still single core, and the few exceptions use parallelism in very trivial cases). This is of course mainly to to deal with state (semaphores/mutex). Although it is possible to program in other languages using &#39;pure&#39; code, its often very ugly (and in that case you may as well use Haskell)<br>
<br><div class="gmail_quote">On Tue, Sep 7, 2010 at 8:37 AM, Johannes Waldmann <span dir="ltr">&lt;<a href="mailto:waldmann@imn.htwk-leipzig.de">waldmann@imn.htwk-leipzig.de</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
<div class="im">Don Stewart &lt;dons &lt;at&gt; <a href="http://galois.com" target="_blank">galois.com</a>&gt; writes:<br>
<br>
&gt; Note that DPH is a programming model, but the implementation currently<br>
&gt; targets shared memory multicores (and to some extent GPUs), not<br>
&gt; distributed systems.<br>
<br>
</div>Yes. I understand that&#39;s only part of what the original poster wanted,<br>
but I&#39;d sure want to use ghc-generated code on a (non-distributed) GPU.<br>
<br>
I keep telling students and colleagues that functional/declarative code<br>
&quot;automatically&quot; parallelizes, with basically &quot;no extra effort&quot;<br>
from the programmer (because it&#39;s all in the compiler) - but I would<br>
feel better with some real code and benchmarks to back that up.<br>
<br>
GPU computing via ghc  could be a huge marketing opportunity  -<br>
if it works, it should be all over the front page of <a href="http://haskell.org" target="_blank">haskell.org</a>?<br>
<font color="#888888"><br>
J.W.<br>
</font><div><div></div><div class="h5"><br>
<br>
_______________________________________________<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></div>