A weblog about programming in Python, C#, Java, Perl and C++ - and the occasional comment on PyCS development
new: discuss community servers on the CommunityServerWiki!
me
the locals
offsite
also available in XML
Copyright (c) 2002 Phillip Pearson
|
2002-10-22Worth readingFound via Charles Miller: An Empirical Comparison of Programming Languages. Lutz Prechelt, An Empirical Comparison of C, C++, Java, Perl, Python, Rexx, and Tcl. It's an interesting read. The conclusions aren't necessarily what you'd expect. The programs written using scripting languages (Perl, Python, Rexx, Tcl) tended to take about half as long to write, but used about twice as much memory as the ones written in C/C++. However, the Java programs took the same time to write as the C/C++ ones but used twice as much memory as the scripts. Ouch! Not good news for Java. Right at the end, he compares the approaches taken by programmers in different languages; the scripters tended to use associative arrays for everything, whereas the C/C++ coders rolled their own data structures, which tended to result in code that wasn't as efficient as it could be. (Still memory-efficient, but the run times weren't as staggeringly quick as they would be if they had used the same sorts of techniques as the scripters). I've always wondered about that: when I code in C++, I almost never use hash tables, because they always take ages to get going. However, in Perl or Python, they're just a few keystrokes away, so I use them all the time. Sigh ... now I'm interested in this, I'm going to have to go code the programs myself to see if I can beat the scores in the paper. Heh ;-) Comment on this post [ so far] |