Hi,


Jim Gibson wrote:
At 9:58 AM +0800 12/2/09, =?GB2312?B?T3JjaGlkIEZhaXJ5ICjAvLuoz8nX0yk=?= wrote: You should also consider the "speed" of the programmer. I can write a Perl program in less than half the time it would take me to write the same program in C, C++, or Java. You will have to invest more programming time for the C version than you would for the Perl version.


Basically, everything that Jim said is true. One more minor point is that two people given the same programming tasks and the same two languages may make different versions faster than the other. Obviously, it depends on their background.

From my own experience, I implemented something in Perl and when its running time and memory usage exceeded my patience level (and that of the CPU it was running on :-) ), I ported it to C++. This may have something to do with me being more comfortable in C/C++, though. Some people I know of prefer Perl (or some similar scripting language) to prototype an algorithm first -- that's another idea.


The best answer to your question would be to write a simple version of your program in both languages and compare. You can also look for


But if your time is limited and you will only write one version, then what Jim says here is the only way you can tell. Note that other people's benchmarks may not properly reflect your problem.

Ray


--
To unsubscribe, e-mail: beginners-unsubscr...@perl.org
For additional commands, e-mail: beginners-h...@perl.org
http://learn.perl.org/


Reply via email to