[Melbourne-pm] Timer::HiRes and alarms? (Was: AI Contest)
mathew.blair.robertson at gmail.com
Thu Nov 11 14:33:52 PST 2010
On 12 November 2010 09:08, Sam Watkins <sam at nipl.net> wrote:
> On Thu, Nov 11, 2010 at 11:04:49PM +1100, Mathew Robertson wrote:
> > complete and utter hogwash.
> > The algorithm is the important part, not the programming language.
> 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.
> Now go wash a hog!
Even that is not correct.
- Perl thunks some functions directly to the C api.
- C doesn'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.
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
Importantly, Perl allows for rapid protyping - which (generally) cant be
said for C.
So while "choosing the same algorithm" for both languages might expect C to
be faster, it doesn't make it so, and indeed rely's on your ability to be a
better programmer than the language/library writers.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Melbourne-pm