/mobile Handheld Friendly website

÷

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

This chart shows 3 comparisons - Time-used, Memory-used and Code-used ~ speed and size.

Each chart bar shows, for one unidentified benchmark, how much the fastest Ruby 1.9 program used compared to the fastest Java 7 -server program.


Look at speed another way - look at a box plot of Time-used data.

 Step 2 : Are the Ruby 1.9 programs faster? Approximately.

This table shows 3 comparisons - Time-used, Memory-used and Code-used ~ speed and size.

Each table row shows, for one named benchmark, how much the fastest Ruby 1.9 program used compared to the fastest Java 7 -server program.

 Ruby 1.9 used what fraction? used how many times more? 
Benchmark Time Memory Code
 pidigits1/51/8
 regex-dna1/21/3
 reverse-complement1/21/7
 binary-trees23×±1/2
 k-nucleotide24×1/41/4
 fasta26×11×1/2
 spectral-norm50×±
 n-body71×1/4±
 mandelbrot216×±±
 fannkuch-redux285×1/41/3
 Ruby 1.9 used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)25×71×170×285×

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

 Step 3 : Are the Ruby 1.9 programs faster? Measurements.

This table shows 5 measurements - CPU Time, Elapsed Time, Memory, Code and ≈ CPU Load ~ speed and size.

For each named benchmark, measurements of the fastest Ruby 1.9 program are shown for comparison against measurements of the fastest Java 7 -server program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 pidigits 
Ruby 1.98.818.8212,372242  1% 100% 0% 0%
Java 7 -server10.614.4363,1561826  71% 69% 52% 45%
 regex-dna 
Ruby 1.931.0114.08269,868501  39% 43% 87% 53%
Java 7 -server23.366.63636,9241410  92% 87% 88% 86%
 reverse-complement 
Ruby 1.97.447.45127,160255  1% 100% 0% 0%
Java 7 -server2.741.31298,2201661  45% 54% 37% 79%
 binary-trees 
Ruby 1.9216.24216.43442,088413  0% 0% 0% 100%
Java 7 -server22.869.41516,1441007  83% 41% 64% 57%
 k-nucleotide 
Ruby 1.9617.75196.33127,648637  94% 62% 80% 80%
Java 7 -server29.238.03463,5162431  90% 98% 89% 89%
 fasta 
Ruby 1.9128.46133.80206,168762  0% 14% 60% 26%
Java 7 -server5.225.1418,1761507  0% 100% 1% 1%
 spectral-norm 
Ruby 1.9864.93226.1427,428828  95% 96% 96% 97%
Java 7 -server17.624.5017,716950  98% 99% 98% 98%
 n-body 
Ruby 1.91,603.831,604.474,7281137  0% 100% 0% 0%
Java 7 -server22.5222.5016,9201424  0% 100% 0% 0%
 mandelbrot 
Ruby 1.95,225.211,317.1068,964925  99% 99% 99% 100%
Java 7 -server23.976.1069,360796  98% 99% 98% 98%
 fannkuch-redux 
Ruby 1.93,831.863,832.914,732422  0% 0% 0% 100%
Java 7 -server53.1913.4717,4161282  98% 100% 98% 100%
 fasta-redux 
No program
Java 7 -server0.130.11?1443  0% 92% 9% 11%

 Step 4 : Are there other Ruby 1.9 programs for these benchmarks?

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

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

 Step 5 : Are there other faster programs for these benchmarks?

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

online book Programming Ruby: The Pragmatic Programmers Guide

ruby 1.9.3p194 (2012-04-20 revision 35410) [x86_64-linux]

Home Page: Ruby is…

Download: Ruby 1.9.3-p194 is released

Revised BSD license

  Home   Conclusions   License   Help