I love programming languages, and I love metrics. Michael Pence posted to the TDAG list about a site that ranks languages based on a battery of tests in order of performance (CPU), memory utilization (Memory), and Lines of Code (LOC). There is another site (I forget who originally shared the link) that ranks languages based on the number of community pages that support that language - this shows how mainstream or popular a language appears. I took the top 10 mainstream languages (excluding SQL since it isn't on the performance list) and ranked them by the combined performance score (CPU + Memory + LOC) and have the results on display for you in the table bellow. For languages that have more then one implementation on the performance rank I just take the top rank. I also combined VB and VBScript, which I realize are in fact different languages.
Language | Popularity | CPU | Memory | Lines | Combined |
---|---|---|---|---|---|
Delphi | 4.814% | 30.72 | 28.00 | 13.78 | 72.56 |
C++ | 15.306% | 27.63 | 25.44 | 19.00 | 72.06 |
C | 16.335% | 30.23 | 28.05 | 13.55 | 70.64 |
Python | 4.704% | 27.00 | 20.54 | 21.58 | 69.13 |
Perl | 8.440% | 25.87 | 21.43 | 21.57 | 67.35 |
VB | 10.136% | 11.15 | 22.46 | 28.08 | 61.69 |
PHP | 10.427% | 21.00 | 16.14 | 22.71 | 59.93 |
Java | 16.997% | 28.40 | 11.64 | 16.08 | 56.12 |
C# | 1.633% | 27.33 | 14.57 | 12.67 | 54.57 |
JavaScript | 1.681% | 18.15 | 17.15 | 18.38 | 53.69 |
The big differences from the rankings on the popularity site versus the ranking here is that Delphi is near the bottom of the popularity rankings (7th), but is at the top (1st) of the performance rankings. Python also ranks significantly better for performance (4th) then for popularity (8th). Moving the other direction we have Java, which is ranked at the top of the popularity chart (1st) and is ranked near the bottom on the performance chart (8th). C# remains at the bottom of both charts.
Because the community / popularity rankings are tracked over time, it also shows trends. Delphi, Python and PHP are moving up in popularity. Java, C/C++, VB and JavaScript are remaining the same, while Perl and C# are moving even lower. It looks like C# might even fall out of mainstream in the near future. Delphi and Python's upward momentum is inline with their better then average performance. C#'s downward momentum is inline with its abysmal performance.
Since C# is the newest language in the round-up it needs strong upward momentum. With all the promotion that Microsoft invested in the launch of C# it would appear it entered the market at an over inflated position, and is falling to a lower ranking. This is one of the languages that developers in general seem to be the most excited about. It is unfortunate that the language does not appear to justify the excitement. Hopefully with the release of C# 2.0 along with .NET 2.0 we will see C# improve both its performance and popularity. It might also have hope in the recent release of Mono 1.0. If not then it might go extinct before ever really catching on as a mainstream language with little to no reason to use it.
Since all the languages listed are mainstream languages, the popularity really isn't that big of an impact. You should be able to find support and developers for a project in that language. The important data is performance. Lines of code probably is not the best indicator of developer productivity, but for now that is what we have to work with. Maybe if you combined the LOC ranking with the popularity you would get a good indicator of productivity.
Based on this data it would appear that if you were looking for a language to start a new project in that you should lean towards Delphi or C/C++ and maybe Python as your first choices. For second tier I would say Perl, VB or Java. Your last resort should be C# or JavaScript as they constantly rank near the bottom in all categories. I am not making a recommendation for PHP since it is for web development only and not a general-purpose language.
4 comments:
Interesting take on the metrics.
One comment. One should use additional critiera for selecting a language, i.e. cross platform requirements, difficultly in learning, etc. Also, javascript is as much for the web as PHP, if not more. PHP is certianly not for web development *only*.
Perhaps worth noting that the C# performance figures refer to version 0.96 of Mono, rather than Microsoft C#. At least according to the page here:
http://shootout.alioth.debian.org/lang/csharp/
Mono is very new, so it's perhaps unfair to be too hard on it, especially when the test is of a beta.
Tim
...quick follow-up on previous comment, I may be wrong about Mono since this page:
http://dada.perl.it/shootout/csharp.html
is for Microsoft C#, so it depends where you looked. On the other hand, even this one is using an early version of the C# compiler (v 7.00.9466), the current one is v 7.10.3052.4.
I'm always interested in perf. tests but in my experience it takes a lot of analysis to get meaningful results.
Tim
Mono C# on "The Great Computer Language Shootout"
http://shootout.alioth.debian.org/great/
Unfortunately the earlier Mono releases have a buglet that interferes with the BSD times command. So the cpu measurements given on the shootout are plain wrong.
Mono 1.1.1 and 1.1.2, on a 2.6.x linux kernel seems to be fine. We hope to provide Mono C# times in the near future.
Isaac
Post a Comment