/mobile Handheld Friendly website
Ubuntu : Intel® Q6600® quad-core |
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.
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 | |
| regex-dna | 2× | 1/2 | 1/2 | |
| pidigits | 3× | 1/4 | 1/8 | |
| reverse-complement | 6× | 1/2 | 1/7 | |
| k-nucleotide | 18× | 1/3 | 1/4 | |
| binary-trees | 23× | 1/3 | 1/2 | |
| fasta | 28× | 12× | 1/2 | |
| spectral-norm | 42× | ± | ± | |
| n-body | 58× | 1/4 | ± | |
| mandelbrot | 193× | ± | ± | |
| fannkuch-redux | 255× | 1/4 | 1/3 | |
| Ruby 1.9 used what fraction? used how many times more? | |||||||
|---|---|---|---|---|---|---|---|
| Time-used | |- | |--- | 25% | median | 75% | ---| | -| |
| (Elapsed secs) | 2× | 2× | 6× | 26× | 58× | 136× | 255× |
± read the measurements and then read the program source code.
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 |
|---|---|---|---|---|---|
| regex-dna | |||||
| Ruby 1.9 | 38.14 | 17.99 | 294,228 | 501 | 91% 36% 40% 46% |
| Java 7 -server | 28.92 | 10.07 | 708,180 | 929 | 65% 64% 83% 76% |
| pidigits | |||||
| Ruby 1.9 | 16.93 | 16.95 | 11,420 | 242 | 0% 0% 0% 100% |
| Java 7 -server | 12.36 | 5.16 | 47,348 | 1826 | 60% 61% 61% 54% |
| reverse-complement | |||||
| Ruby 1.9 | 8.67 | 8.68 | 174,744 | 255 | 0% 0% 100% 0% |
| Java 7 -server | 2.88 | 1.52 | 294,656 | 1661 | 56% 74% 46% 16% |
| k-nucleotide | |||||
| Ruby 1.9 | 586.70 | 172.64 | 126,136 | 637 | 95% 96% 75% 76% |
| Java 7 -server | 34.65 | 9.39 | 381,176 | 2431 | 92% 89% 97% 92% |
| binary-trees | |||||
| Ruby 1.9 | 226.77 | 226.88 | 210,372 | 413 | 0% 0% 0% 100% |
| Java 7 -server | 23.89 | 9.78 | 532,932 | 1007 | 61% 77% 45% 63% |
| fasta | |||||
| Ruby 1.9 | 136.61 | 137.45 | 182,728 | 762 | 58% 1% 5% 37% |
| Java 7 -server | 4.95 | 4.86 | 14,976 | 1507 | 1% 0% 100% 1% |
| spectral-norm | |||||
| Ruby 1.9 | 660.30 | 176.82 | 18,820 | 828 | 94% 95% 93% 92% |
| Java 7 -server | 16.38 | 4.21 | 14,556 | 950 | 97% 97% 99% 98% |
| n-body | |||||
| Ruby 1.9 | 1,408.80 | 1,409.18 | 3,668 | 1137 | 88% 0% 0% 12% |
| Java 7 -server | 24.37 | 24.34 | 13,932 | 1424 | 0% 0% 0% 100% |
| mandelbrot | |||||
| Ruby 1.9 | 5,296.44 | 1,330.64 | 57,684 | 925 | 100% 100% 100% 100% |
| Java 7 -server | 27.15 | 6.89 | 67,832 | 796 | 98% 99% 99% 99% |
| fannkuch-redux | |||||
| Ruby 1.9 | 4,368.02 | 4,369.20 | 3,400 | 422 | 0% 0% 100% 0% |
| Java 7 -server | 67.73 | 17.13 | 14,208 | 1282 | 98% 99% 99% 100% |
| fasta-redux | |||||
| Java 7 -server | 0.13 | 0.11 | ? | 1443 | 9% 18% 10% 90% |
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.
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.
online book Programming Ruby: The Pragmatic Programmers Guide
ruby 1.9.3p194 (2012-04-20 revision 35410) [i686-linux]
Home Page: Ruby is…
Download: Ruby 1.9.3-p194 is released