Sorry sorry sorry ^^<br>I read too fast and realized I was wrong before you sent this.<br><br>Okay so then it would be nice that somewhere with higher skills tells us where does Haskell recursive calls stand when compared to C&#39;s.<br>

<br><div class="gmail_quote">2012/5/6 Roman Cheplyaka <span dir="ltr">&lt;<a href="mailto:roma@ro-che.info" target="_blank">roma@ro-che.info</a>&gt;</span><br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">

It is not tail-recursive.<br>
<br>
* Yves Parès &lt;<a href="mailto:yves.pares@gmail.com">yves.pares@gmail.com</a>&gt; [2012-05-06 10:58:45+0200]<br>
<div class="im">&gt; I do not agree: the fib function is tail-recursive, any good C compiler is<br>
&gt; able to optimize away the calls and reduce it to a mere loop.<br>
&gt; At least that&#39;s what I learnt about tail recursion in C with GCC.<br>
&gt;<br>
&gt; 2012/5/6 Artur &lt;<a href="mailto:apeka1990@gmail.com">apeka1990@gmail.com</a>&gt;<br>
&gt;<br>
&gt; &gt; On <a href="tel:06.05.2012%2010" value="+33605201210">06.05.2012 10</a>:44, Ivan Lazar Miljenovic wrote:<br>
&gt; &gt;<br>
&gt; &gt;&gt; On 6 May 2012 16:40, Janek S.&lt;<a href="mailto:fremenzone@poczta.onet.pl">fremenzone@poczta.onet.pl</a>&gt;  wrote:<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;&gt; Hi,<br>
&gt; &gt;&gt;&gt;<br>
&gt; &gt;&gt;&gt; a couple of times I&#39;ve encountered a statement that Haskell programs can<br>
&gt; &gt;&gt;&gt; have performance<br>
&gt; &gt;&gt;&gt; comparable to programs in C/C++. I&#39;ve even read that thanks to<br>
&gt; &gt;&gt;&gt; functional nature of Haskell,<br>
&gt; &gt;&gt;&gt; compiler can reason and make guarantess about the code and use that<br>
&gt; &gt;&gt;&gt; knowledge to automatically<br>
&gt; &gt;&gt;&gt; parallelize the program without any explicit parallelizing commands in<br>
&gt; &gt;&gt;&gt; the code. I haven&#39;t seen<br>
&gt; &gt;&gt;&gt; any sort of evidence that would support such claims. Can anyone provide<br>
&gt; &gt;&gt;&gt; a code in Haskell that<br>
&gt; &gt;&gt;&gt; performs better in terms of execution speed than a well-written C/C++<br>
&gt; &gt;&gt;&gt; program? Both Haskell and C<br>
&gt; &gt;&gt;&gt; programs should implement the same algorithm (merge sort in Haskell<br>
&gt; &gt;&gt;&gt; outperforming bubble sort in<br>
&gt; &gt;&gt;&gt; C doesn&#39;t count), though I guess that using Haskell-specific idioms and<br>
&gt; &gt;&gt;&gt; optimizations is of<br>
&gt; &gt;&gt;&gt; course allowed.<br>
&gt; &gt;&gt;&gt;<br>
</div>&gt; &gt;&gt; How about <a href="http://donsbot.wordpress.com/**2007/11/29/use-those-extra-**" target="_blank">http://donsbot.wordpress.com/**2007/11/29/use-those-extra-**</a><br>
&gt; &gt;&gt; cores-and-beat-c-today-**parallel-haskell-redux/&lt;<a href="http://donsbot.wordpress.com/2007/11/29/use-those-extra-cores-and-beat-c-today-parallel-haskell-redux/" target="_blank">http://donsbot.wordpress.com/2007/11/29/use-those-extra-cores-and-beat-c-today-parallel-haskell-redux/</a>&gt;<br>


<div class="im">&gt; &gt;&gt; ?<br>
&gt; &gt;&gt;<br>
&gt; &gt;&gt;  Hi,<br>
&gt; &gt;<br>
&gt; &gt;  isn&#39;t it that particular Haskell code is outperforming C (22 seconds vs.<br>
&gt; &gt; 33), just because the author uses recursion in C? I surely love Haskell,<br>
&gt; &gt; and the way it&#39;s code is easy parallelized, but that example seams not fair.<br>
&gt; &gt;<br>
&gt; &gt;<br>
</div>&gt; &gt; ______________________________**_________________<br>
&gt; &gt; Haskell-Cafe mailing list<br>
&gt; &gt; <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
&gt; &gt; <a href="http://www.haskell.org/**mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/**mailman/listinfo/haskell-cafe</a>&lt;<a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a>&gt;<br>


<div class="HOEnZb"><div class="h5">&gt; &gt;<br>
<br>
&gt; _______________________________________________<br>
&gt; Haskell-Cafe mailing list<br>
&gt; <a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
&gt; <a href="http://www.haskell.org/mailman/listinfo/haskell-cafe" target="_blank">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br>
<br>
</div></div><span class="HOEnZb"><font color="#888888">--<br>
Roman I. Cheplyaka :: <a href="http://ro-che.info/" target="_blank">http://ro-che.info/</a><br>
</font></span></blockquote></div><br>