The Computer Language
Benchmarks Game

Ruby versus Matz's Ruby fastest programs

Always look at the source code.

These are only the fastest programs. Look at the other programs. They may seem more-like a fair comparison to you.

n-body
source secs mem gz busy cpu load
Ruby 253.50 25,232 1137 258.38 1% 1% 0% 100%
Matz's Ruby 2,293.99 3,952 1137 4,696.44 78% 12% 75% 40%
fasta
source secs mem gz busy cpu load
Ruby 31.29 122,852 1069 34.96 2% 4% 5% 100%
Matz's Ruby 253.47 101,720 1071 256.95 1% 100% 0% 0%
binary-trees
source secs mem gz busy cpu load
Ruby 60.99 875,584 364 63.56 96% 4% 3% 1%
Matz's Ruby 310.83 1,413,528 1096 984.39 72% 73% 71% 100%
spectral-norm
source secs mem gz busy cpu load
Ruby 113.92 25,196 326 115.91 1% 0% 1% 100%
Matz's Ruby 411.31 4,400 292 825.97 0% 100% 10% 90%
fannkuch-redux
source secs mem gz busy cpu load
Ruby 1,255.50 25,200 384 1,263.51 100% 0% 0% 0%
Matz's Ruby 3,599.05 16,720 1444 13,876.93 95% 94% 100% 97%
k-nucleotide
source secs mem gz busy cpu load
Ruby 72.19 400,272 859 265.83 100% 88% 95% 86%
Matz's Ruby 179.62 126,924 644 589.76 95% 69% 67% 98%
reverse-complement
source secs mem gz busy cpu load
Ruby 10.58 2,009,736 517 20.20 50% 13% 96% 32%
Matz's Ruby 21.41 492,788 264 43.01 1% 100% 0% 100%
regex-redux
source secs mem gz busy cpu load
Ruby 9.72 332,016 724 21.17 39% 94% 45% 39%
Matz's Ruby 16.43 221,312 724 48.13 100% 100% 47% 47%
mandelbrot
source secs mem gz busy cpu load
Ruby 259.25 72,264 931 1,014.80 97% 97% 100% 97%
Matz's Ruby 133.76 33,612 918 513.86 96% 96% 96% 96%
pidigits
source secs mem gz busy cpu load
Ruby 2.01 437,692 485 4.06 49% 10% 100% 42%
Matz's Ruby   Failed
Ruby

ruby 3.0.0preview1 (2020-09-25 master 0096d2b895) [x86_64-linux]
--jit

Matz's Ruby

ruby 1.8.7 (2008-08-11 patchlevel 72) [x86_64-linux]
 
So old that I haven't been able to get rubygems to work
no backport, no gmp