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

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

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

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

 Ruby JRuby used what fraction? used how many times more? 
Benchmark Time Memory Code
 k-nucleotide±47×1/3
 reverse-complement1/3
 binary-trees±
 n-body ±
 fannkuch-redux10× ±
 fasta11× ±
 regex-dna13×±
 spectral-norm17× ±
 Ruby JRuby used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)±±10×12×17×17×

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

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

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 k-nucleotide 
Ruby JRuby96.7096.801,824,852449  1% 1% 1% 100%
JavaScript V896.0296.1139,1441249  1% 1% 1% 100%
 reverse-complement 
Ruby JRuby24.8424.871,344,420255  0% 1% 1% 100%
JavaScript V87.437.44313,248787  0% 1% 1% 100%
 binary-trees 
Ruby JRuby166.86167.03903,012402  1% 1% 1% 100%
JavaScript V841.1841.23483,692467  0% 1% 1% 100%
 n-body 
Ruby JRuby390.81391.35713,5801137  0% 1% 1% 100%
JavaScript V842.0242.037,5761527  1% 1% 0% 100%
 fannkuch-redux 
Ruby JRuby720.42720.62648,500384  0% 1% 1% 100%
JavaScript V868.8968.927,068539  1% 0% 0% 100%
 fasta 
Ruby JRuby231.53231.81633,836760  0% 1% 1% 100%
JavaScript V821.8721.8931,616923  0% 1% 1% 100%
 regex-dna 
Ruby JRuby46.3146.34942,108343  0% 1% 1% 100%
JavaScript V83.523.52465,180373  1% 2% 1% 100%
 spectral-norm 
Ruby JRuby273.47273.84644,376326  0% 1% 1% 100%
JavaScript V815.7115.7111,180328  1% 1% 0% 100%
 pidigits 
Ruby JRuby6.946.95415,096240  1% 1% 1% 100%
No program
 mandelbrot 
Ruby JRuby12.0812.11626,576307  1% 1% 1% 100%
JavaScript V8Bad Output
 fasta-redux
   No programs

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

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

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

 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest Ruby JRuby and JavaScript V8 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 JRuby : everything is an object scripting for jvm 

jruby 1.7.16.1 (1.9.3p392) 2014-10-28 4e93f31 on Java HotSpot(TM) Server VM 1.8.0_25-b17 +jit [linux-i386]

Home Page: 100% Pure-Java Implementation of the Ruby Programming Language

JRuby Performance Tuning

"So You Want To Optimize Ruby" (So You want to optimize an implementation of the Ruby language.)

Download: http://jruby.org/download

Revised BSD license

  Home   Conclusions   License   Play