<div class="gmail_quote">On 12 November 2010 09:08, Sam Watkins <span dir="ltr">&lt;<a href="mailto:sam@nipl.net">sam@nipl.net</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex;">
On Thu, Nov 11, 2010 at 11:04:49PM +1100, Mathew Robertson wrote:<br>
&gt; complete and utter hogwash.<br>
&gt;<br>
&gt; The algorithm is the important part, not the programming language.<br>
<br>
Yes, the algorithm is most important, but given a C program with a good algorithm and a perl program with the same good algorithm, my money is on the C program, as it will have time to explore perhaps 100 times more possibilities in the game tree.<br>

<br>
Now go wash a hog!<br></blockquote><div><br></div><div>Even that is not correct.</div><div><br></div><div>- Perl thunks some functions directly to the C api.</div><div>- C doesn&#39;t have native support for some features native to Perl (maps, regexs, etc), so you will need to either create one or use an existing one.</div>
<div><br></div><div>Since those implementations might be slower than the Perl equivalent, you might end up with a slower program. Perl has had a lot of fine tuning, so you are going to have to do a lot of work (say use ASM, not C) to generate faster code.</div>
<div><br></div><div>Importantly, Perl allows for rapid protyping - which (generally) cant be said for C.</div><div><br></div><div>So while &quot;choosing the same algorithm&quot; for both languages might expect C to be faster, it doesn&#39;t make it so, and indeed rely&#39;s on your ability to be a better programmer than the language/library writers.</div>
<div><br></div><div>Mathew Robertson</div></div>