unbiased benchmark

Hyunchul Kim sundol at sfc.keio.ac.jp
Fri Mar 13 01:00:31 EDT 2009


In the system that I tested, results were different.
*************
System was
CPU: AMD Phenom(tm) 9950 Quad-Core Processor, Frequency 2600MHz, L2 
cache 512KB
Memory 3164MB
OS: Ubuntu 8.10


When I tried this benchmark for the first time,
id at pc:~$ time python bench.py

real    0m0.010s
user    0m0.008s
sys    0m0.000s
id at pc:~$ time ruby bench.rb

real    0m0.108s
user    0m0.000s
sys    0m0.004s

Python was faster than Ruby 10 times!!
As I repeated, results showed shorter times and became stable.
After a few repeat, stable results were

id at pc:~$ time python bench.py

real    0m0.010s
user    0m0.008s
sys    0m0.000s
id at pc:~$ time ruby bench.rb

real    0m0.004s
user    0m0.004s
sys    0m0.000s

Now, Ruby is faster two times.
Have you repeated your benchmark?
Your results looks to be over-exaggeration even if this benchmark is fair.

Hyunchul


Sam Ettessoc wrote:
> Dear sir,
>
> I would like to share a benchmark I did. The computer used was a
> 2160MHz Intel Core Duo w/ 2000MB of 667MHz DDR2 SDRAM running MAC OS
> 10.5.6 and a lots of software running (a typical developer
> workstation).
>
> Python benchmark:
> HAMBURGUESA:benchmark sam$ echo 1+1 > bench.py
> HAMBURGUESA:benchmark sam$ time python bench.py
> real	0m0.064s
> user	0m0.049s
> sys	0m0.013s
>
> Ruby benchmark:
> HAMBURGUESA:benchmark sam$ echo 1+1 > bench.rb
> HAMBURGUESA:benchmark sam$ time ruby bench.rb
> real	0m0.006s
> user	0m0.003s
> sys	0m0.003s
>
> Can you believe it? Ruby is 10 times faster than Python.
>
> On a side note, when I subscribed to the Python mailing list, it took
> less than 200ms before I got the confirmation email. For the Ruby
> mailing list, it took over 9000ms! Which is 4500% less performant!
>
> Sam Ettessoc
> p.s. I have no affiliation with ruby or python devloppement team.
> --
> http://mail.python.org/mailman/listinfo/python-list
>
>
>   




More information about the Python-list mailing list