Some time ago I wrote a really simple code snippet to see the performance differences between Python, PHP, C and Java (the languages I tinker in) on my particular machine (i3 M 330, 2.13 GHz / 4 GB RAM / Ubuntu 15.04 x64).
The results were as follows:
~ 14.2 seconds for Python 3.4.3 [1]
~ 9.0 seconds for Python 2.7.9 [1]
~ 9.0 seconds for PHP 5.6 [2]
~ 2.3 seconds for C [3]
~ 2.3 seconds for Java 8 [4]
Again, this was on my machine with out of the box settings. I have linked the test code that I wrote and perhaps there is something wrong with my Python and PHP code but to me the results were quite revealing. Also it's interesting to see that on my configuration C and Java both hit the limit of my CPU (I can't explain the score otherwise) and I can't know for sure if on a more powerful CPU Java would still be on pair with C.
The results were as follows:
~ 14.2 seconds for Python 3.4.3 [1]
~ 9.0 seconds for Python 2.7.9 [1]
~ 9.0 seconds for PHP 5.6 [2]
~ 2.3 seconds for C [3]
~ 2.3 seconds for Java 8 [4]
Again, this was on my machine with out of the box settings. I have linked the test code that I wrote and perhaps there is something wrong with my Python and PHP code but to me the results were quite revealing. Also it's interesting to see that on my configuration C and Java both hit the limit of my CPU (I can't explain the score otherwise) and I can't know for sure if on a more powerful CPU Java would still be on pair with C.
[1] https://gist.github.com/anonymous/7edafa3889be967a1e1d
[2] https://gist.github.com/anonymous/56ff76849f5a312340d9
[3] https://gist.github.com/anonymous/5717ba935b43bad09e1d
[4] https://gist.github.com/anonymous/6b0c2f11609b951b64f3