пятница, 8 июля 2011 г.

Funny results on programming languages performance stub test

I've just wrote a stub performance test for different programming languages and I've got fun results.

The stub summarizes all numbers from 1 to 100,000,000. The results below:

Test: C
Result (seconds): 0.29

Test: Java
Result (seconds): 0.20

Test: Perl
Result (seconds): 20.00

Test: PHP
Result (seconds): 8.06

Test: Python
Result (seconds): 27.29

Test: Ruby
Result (seconds): 83.67

Java faster than C. PHP faster than Python (why does Python have compiled files??). PHP hits Perl.
Ruby sucks as always.

Sources of the test are here

Pic unrelated

Комментариев нет: