/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
 fasta1/236×±
 spectral-norm1/2±
 n-body±±±
 regex-dna±±±
 mandelbrot±1/2±
 binary-trees †±1/3±
 k-nucleotide1/4±
 reverse-complement1/5±
 fannkuch-redux †1/61/2
 pidigits±
 Ruby 2.0 used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/21/2±±

† 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
 fasta 
Ruby 2.0106.86106.92223,864772  92% 0% 8% 0%
Python 3219.23222.966,208788  31% 26% 3% 41%
 spectral-norm 
Ruby 2.0402.52107.2933,912828  95% 94% 94% 93%
Python 3804.62202.5439,668437  99% 99% 100% 99%
 n-body 
Ruby 2.0667.68667.846,1721137  99% 0% 1% 0%
Python 3934.69935.016,2921181  8% 74% 18% 0%
 regex-dna 
Ruby 2.030.6713.88290,688501  41% 89% 41% 50%
Python 326.3412.88255,724478  41% 33% 99% 32%
 mandelbrot 
Ruby 2.02,135.33534.7788,968925  100% 100% 100% 100%
Python 31,779.60446.24180,408777  100% 100% 100% 100%
 binary-trees 
Ruby 2.0203.16203.36436,644439  0% 78% 22% 0% †
Python 3539.48142.511,209,460626  93% 95% 98% 93% †
 k-nucleotide 
Ruby 2.0679.76201.03128,768637  88% 84% 70% 98%
Python 3384.41129.56451,488647  60% 98% 58% 81%
 reverse-complement 
Ruby 2.09.219.22128,284255  0% 62% 38% 0%
Python 35.375.38679,776325  0% 0% 100% 0%
 fannkuch-redux 
Ruby 2.03,235.413,236.686,152384  0% 100% 0% 0% †
Python 33,556.66900.6036,288797  99% 100% 97% 99% †
 pidigits 
Ruby 2.09.509.5214,800242  0% 0% 0% 100%
Python 32.402.406,972255  0% 0% 100% 1%
 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) [x86_64-linux]

Home Page: Ruby is…

Download: Ruby 2.0.0-p0 is released

Revised BSD license

  Home   Conclusions   License   Play