/mobile Handheld Friendly website
x64 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 | |
| pidigits | 2× | 1/5 | 1/8 | |
| regex-dna | 2× | 1/2 | 1/3 | |
| reverse-complement | 6× | 1/2 | 1/7 | |
| binary-trees | 23× | ± | 1/2 | |
| k-nucleotide | 24× | 1/4 | 1/4 | |
| fasta | 26× | 11× | 1/2 | |
| spectral-norm | 50× | 2× | ± | |
| n-body | 71× | 1/4 | ± | |
| mandelbrot | 216× | ± | ± | |
| fannkuch-redux | 285× | 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× | 25× | 71× | 170× | 285× |
± 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 |
|---|---|---|---|---|---|
| pidigits | |||||
| Ruby 1.9 | 8.81 | 8.82 | 12,372 | 242 | 1% 100% 0% 0% |
| Java 7 -server | 10.61 | 4.43 | 63,156 | 1826 | 71% 69% 52% 45% |
| regex-dna | |||||
| Ruby 1.9 | 31.01 | 14.08 | 269,868 | 501 | 39% 43% 87% 53% |
| Java 7 -server | 23.36 | 6.63 | 636,924 | 1410 | 92% 87% 88% 86% |
| reverse-complement | |||||
| Ruby 1.9 | 7.44 | 7.45 | 127,160 | 255 | 1% 100% 0% 0% |
| Java 7 -server | 2.74 | 1.31 | 298,220 | 1661 | 45% 54% 37% 79% |
| binary-trees | |||||
| Ruby 1.9 | 216.24 | 216.43 | 442,088 | 413 | 0% 0% 0% 100% |
| Java 7 -server | 22.86 | 9.41 | 516,144 | 1007 | 83% 41% 64% 57% |
| k-nucleotide | |||||
| Ruby 1.9 | 617.75 | 196.33 | 127,648 | 637 | 94% 62% 80% 80% |
| Java 7 -server | 29.23 | 8.03 | 463,516 | 2431 | 90% 98% 89% 89% |
| fasta | |||||
| Ruby 1.9 | 128.46 | 133.80 | 206,168 | 762 | 0% 14% 60% 26% |
| Java 7 -server | 5.22 | 5.14 | 18,176 | 1507 | 0% 100% 1% 1% |
| spectral-norm | |||||
| Ruby 1.9 | 864.93 | 226.14 | 27,428 | 828 | 95% 96% 96% 97% |
| Java 7 -server | 17.62 | 4.50 | 17,716 | 950 | 98% 99% 98% 98% |
| n-body | |||||
| Ruby 1.9 | 1,603.83 | 1,604.47 | 4,728 | 1137 | 0% 100% 0% 0% |
| Java 7 -server | 22.52 | 22.50 | 16,920 | 1424 | 0% 100% 0% 0% |
| mandelbrot | |||||
| Ruby 1.9 | 5,225.21 | 1,317.10 | 68,964 | 925 | 99% 99% 99% 100% |
| Java 7 -server | 23.97 | 6.10 | 69,360 | 796 | 98% 99% 98% 98% |
| fannkuch-redux | |||||
| Ruby 1.9 | 3,831.86 | 3,832.91 | 4,732 | 422 | 0% 0% 0% 100% |
| Java 7 -server | 53.19 | 13.47 | 17,416 | 1282 | 98% 100% 98% 100% |
| fasta-redux | |||||
| Java 7 -server | 0.13 | 0.11 | ? | 1443 | 0% 92% 9% 11% |
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) [x86_64-linux]
Home Page: Ruby is…
Download: Ruby 1.9.3-p194 is released