Always good to provide some non-scientific comparative performance data – tends to rub people the wrong way, but here goes anyway 🙂
Anyway, http://www.twistedmatrix.com/~glyph/rant/python-vs-java.html detailed a quick performance evaluation that I thought was ‘sort of ‘ useful for some research I was doing – then I saw the date on the page – 2000 – which is shall we say, a ‘tad’ old. So I thought i’d re-run the tests on a current platform, in this case Ubuntu 7.10 ‘Gutsy’. As i’m only interested in the performance ratio between Java and Python rather than the overall performance increase due to improvements in underlying hardware i’ve converted the results on the previous web page to a ratio (Java/Python) as well to see how the systems have changed in the last 7 years.
|Test||Ratio (Java/Python) in 2000|
As you can see from those numbers (>1) that Java was considerably slower than Python in the arbitrary tests performed. As I was a little curious to see it for myself I re-ran the code detailed on the page on my fresh gutsy system albeit with an openjdk code drop just to see if things had changed and how.
|Test||Ratio (Java/Python) in 2007|
As you can see Java has improved in most of the tests so that it now significantly outperforms python. I guess the major disappointment is the Interpreter initialization which seems to have gotten significantly worse 😦 but overall Java performance has according to these tests improved relative to python.
Please note that I haven’t looked at the suitability of the tests themselves, merely re-run them for myself to try and improve my understanding – i’ve released it here so that there is at least a recent counterpoint to the 2000 article. Flames >/dev/null please