/mobile Handheld Friendly website

÷

 1 : Are the Ruby 2.0 programs faster? At a glance.

Each chart bar shows, for one unidentified benchmark, how much the fastest Ruby 2.0 program used compared to the fastest Python 3 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 Ruby 2.0 programs faster? Approximately.

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

 Ruby 2.0 used what fraction? used how many times more? 
Benchmark Time Memory Code
 spectral-norm±±
 fasta±40×±
 n-body±±±
 regex-dna±±±
 k-nucleotide1/3±
 reverse-complement1/5±
 binary-trees †1/2±
 pidigits369×
 mandelbrot10×±
 fannkuch-redux †1/51/2
 Ruby 2.0 used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)±±±

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

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

 3 : Are the Ruby 2.0 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 Ruby 2.0 program are shown for comparison against measurements of the fastest Python 3 program.

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

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

 4 : Are there other Ruby 2.0 programs for these benchmarks?

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

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

 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest Ruby 2.0 and Python 3 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.

 Ruby 2.0 : the new Ruby 

online book Programming Ruby: The Pragmatic Programmers Guide

ruby 2.0.0p0 (2013-02-24 revision 39474) [i686-linux]

Home Page: Ruby is…

Download: Ruby 2.0.0-p0 is released

Revised BSD license

  Home   Conclusions   License   Play