/mobile Handheld Friendly website

vs

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

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

(Memory use is only compared for tasks that require memory to be allocated.)


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 programs faster? Approximately.

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

(Memory use is only compared for tasks that require memory to be allocated.)

 Ruby used what fraction? used how many times more? 
Benchmark Time Memory Code
 reverse-complement1/21/9±
 pidigits1/2 ±
 regex-dna1/21/6±
 fasta± ±
 binary-trees±1/2±
 spectral-norm ±
 k-nucleotide1/4±
 mandelbrot ±
 n-body ±
 fannkuch-redux ±
 Ruby used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/21/21/2

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

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

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 reverse-complement 
Ruby10.6310.64127,856255  0% 1% 0% 100%
Ruby JRuby25.2725.301,189,288255  0% 1% 0% 100%
 pidigits 
Ruby11.0811.1172,408240  0% 0% 1% 100%
Ruby JRuby20.8120.86610,700240  0% 1% 1% 100%
 regex-dna 
Ruby28.1428.15162,792442  0% 1% 1% 100%
Ruby JRuby49.1649.201,003,532343  0% 1% 1% 100%
 fasta 
Ruby218.22220.085,380987  1% 1% 1% 100%
Ruby JRuby245.09247.41615,692760  0% 1% 1% 100%
 binary-trees 
Ruby222.74222.85557,644413  0% 1% 1% 100%
Ruby JRuby168.68168.87899,264439  1% 1% 1% 100%
 spectral-norm 
Ruby567.84568.016,624326  1% 1% 1% 100%
Ruby JRuby294.82295.25605,320326  0% 1% 1% 100%
 k-nucleotide 
Ruby189.00192.22499,732449  0% 1% 0% 100%
Ruby JRuby94.3094.391,820,684449  0% 1% 1% 100%
 mandelbrot 
Ruby3,857.693,859.075,288307  0% 1% 1% 100%
Ruby JRuby1,177.891,179.89618,712307  0% 1% 1% 100%
 n-body 
Ruby1,433.221,433.665,2881137  0% 0% 0% 100%
Ruby JRuby427.21427.86632,1801137  0% 1% 1% 100%
 fannkuch-redux 
Ruby3,192.973,194.075,284384  0% 1% 1% 100%
Ruby JRuby877.70877.97616,088384  0% 1% 1% 100%
 fasta-redux 
Ruby1.801.816,560772  0% 1% 1% 99%
No program

 4 : Are there other Ruby programs for these benchmarks?

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

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

 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest Ruby and Ruby JRuby 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 : the new Ruby 

online book Programming Ruby: The Pragmatic Programmers Guide

ruby 2.1.0p0 (2013-12-25 revision 44422) [i686-linux]

Home Page: Ruby is…

Download: Ruby 2.1.0 is released

Revised BSD license

  Home   Conclusions   License   Play