Archive

Benchmarks: C Vs Perl5.16 Vs PHP5.5 Vs Python2/3 Vs Ruby2

Oh, today is a sad, sad day for me.

Ruby seems to be as slow as Python3; which, in my previous benchmark: https://gitlab.com/renich/benchmarks/ was not! It was just between PHP and Python2.

Not the published one but, I remember, ruby was around 400 ms... damn... really, I am sad... sniff... sniff...

[renich@introdesk one_million]$ make all
gcc -O9 -o one_million one_million.c &> /dev/null
time ./one_million &> /dev/null
real        0m0.144s
user        0m0.137s
sys 0m0.004s

time perl one_million.pl &> /dev/null
real        0m0.248s
user        0m0.239s
sys 0m0.005s

time php-cgi one_million.phps &> /dev/null
real        0m0.482s
user        0m0.283s
sys 0m0.027s

time python one_million.py &> /dev/null
real        0m0.776s
user        0m0.752s
sys 0m0.020s

time python3 one_million.py3 &> /dev/null
real        0m3.087s
user        0m2.421s
sys 0m0.049s

time ruby one_million.rb &> /dev/null
real        0m2.634s
user        0m1.338s
sys 0m0.103s