The Computer Language
Benchmarks Game

Ruby programs versus Go

by benchmark task performance

regex-redux
source secs mem gz cpu cpu load
Ruby 28.80 309,760 424 28.77 15% 48% 20% 19%
Go 29.29 344,348 798 61.79 37% 59% 79% 38%
binary-trees
source secs mem gz cpu cpu load
Ruby 54.24 510,868 1078 153.99 73% 98% 67% 72%
Go 35.18 277,864 660 132.94 96% 94% 94% 95%
pidigits
source secs mem gz cpu cpu load
Ruby 3.14 477,092 478 3.12 0% 100% 2% 1%
Go 2.02 10,744 603 2.02 2% 0% 5% 96%
k-nucleotide
source secs mem gz cpu cpu load
Ruby 101.95 381,312 852 367.82 84% 98% 85% 95%
Go 14.79 149,212 1713 53.03 88% 90% 96% 87%
reverse-complement
source secs mem gz cpu cpu load
Ruby 4.03 505,656 509 7.14 51% 83% 37% 9%
Go 0.49 133,532 1278 0.87 76% 30% 27% 49%
n-body
source secs mem gz cpu cpu load
Ruby 723.69 8,916 1137 723.48 25% 86% 1% 9%
Go 21.47 1,560 1200 21.47 100% 0% 1% 1%
spectral-norm
source secs mem gz cpu cpu load
Ruby 141.49 50,156 835 544.76 96% 97% 96% 97%
Go 3.96 2,584 548 15.70 99% 99% 99% 99%
fannkuch-redux
source secs mem gz cpu cpu load
Ruby 710.58 33,348 1426 2,761.73 99% 99% 95% 97%
Go 14.49 3,204 896 57.82 100% 100% 100% 100%
fasta
source secs mem gz cpu cpu load
Ruby 108.36 107,984 973 108.32 7% 10% 75% 10%
Go 2.17 3,584 1344 5.84 59% 78% 70% 64%
mandelbrot
source secs mem gz cpu cpu load
Ruby 463.95 69,656 1019 1,852.06 100% 100% 100% 100%
Go 5.46 31,172 905 21.66 99% 100% 100% 99%
Ruby

ruby 2.4.0p0 (2016-12-24 revision 57164) [x86_64-linux]

Go

go version go1.9 linux/amd64