/mobile Handheld Friendly website

÷

 1 : Are the Python 3 programs faster? At a glance.

Each chart bar shows, for one unidentified benchmark, how much the fastest Python 3 program used compared to the fastest Ruby 2.0 program.


These are not the only compilers and interpreters. These are not the only programs that could be written. These are not the only tasks that could be solved. These are just 10 tiny examples.

 2 : Are the Python 3 programs faster? Approximately.

Each table row shows, for one named benchmark, how much the fastest Python 3 program used compared to the fastest Ruby 2.0 program.

 Python 3 used what fraction? used how many times more? 
Benchmark Time Memory Code
 fannkuch-redux †1/4
 mandelbrot1/41/10±
 pidigits1/31/3691/3
 binary-trees †1/2±
 reverse-complement1/2±
 k-nucleotide1/2±
 regex-dna±±±
 n-body±±±
 fasta±1/40±
 spectral-norm±±1/2
 Python 3 used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/41/41/31/2±±±

† possible mismatch - one-core program compared to multi-core program.

± read the measurements and then read the program source code.

 3 : Are the Python 3 programs faster? Measurements.

These are not the only tasks that could be solved. These are just 10 tiny examples. These are not the only compilers and interpreters. These are not the only programs that could be written.

For each named benchmark, measurements of the fastest Python 3 program are shown for comparison against measurements of the fastest Ruby 2.0 program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 fannkuch-redux 
Python 34,138.161,045.6925,128797  99% 99% 98% 100% †
Ruby 2.04,122.874,124.154,864384  29% 69% 4% 1% †
 mandelbrot 
Python 31,746.99438.656,772777  100% 100% 100% 100%
Ruby 2.06,153.431,548.3166,512925  100% 100% 100% 99%
 pidigits 
Python 33.063.075,440255  1% 0% 0% 100%
Ruby 2.09.439.462,009,220653  2% 0% 0% 98%
 binary-trees 
Python 3524.47139.16685,880626  98% 93% 93% 93% †
Ruby 2.0231.93232.04393,696439  86% 0% 0% 15% †
 reverse-complement 
Python 36.526.54601,488325  0% 0% 100% 0%
Ruby 2.010.1610.17127,452255  0% 0% 1% 100%
 k-nucleotide 
Python 3489.02161.22422,160647  62% 55% 97% 90%
Ruby 2.0836.88247.46128,020637  94% 74% 96% 76%
 regex-dna 
Python 325.8912.98235,412478  40% 68% 40% 53%
Ruby 2.041.5519.37262,996501  88% 37% 49% 41%
 n-body 
Python 31,086.651,086.894,7161181  93% 0% 0% 7%
Ruby 2.01,589.191,589.684,8841137  69% 10% 22% 1%
 fasta 
Python 3246.95249.754,600788  24% 2% 25% 51%
Ruby 2.0176.22178.52185,964772  53% 30% 15% 4%
 spectral-norm 
Python 31,062.11268.3227,732437  99% 99% 99% 99%
Ruby 2.0711.89186.3425,092828  97% 95% 96% 96%
 fasta-redux
   No programs

† possible mismatch - one-core program compared to multi-core program.

 4 : Are there other Python 3 programs for these benchmarks?

Remember - those are just the fastest Python 3 and Ruby 2.0 programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for Python 3.

Maybe one of those other Python 3 programs is fastest on a different OS/machine.

 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest Python 3 and Ruby 2.0 programs measured on this OS/machine. Check if there are faster implementations of these benchmark programs for other programming languages.

Maybe one of those other programs is fastest on a different OS/machine.

 Python 3 : the new Python 

Python 3.3.1 (default, Apr 11 2013, 12:56:47)
[GCC 4.7.2] on linux

"3.x is the newest branch of Python and the intended future of the language."

Home Page: Python 3.3.1 was released on April 7th, 2013.

Revised BSD license

  Home   Conclusions   License   Play