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.76 353,332 798 62.56 50% 67% 53% 41%
binary-trees
source secs mem gz cpu cpu load
Ruby 58.72 192,132 1123 166.36 67% 61% 68% 90%
Go 39.68 364,612 688 150.64 95% 95% 95% 96%
pidigits
source secs mem gz cpu cpu load
Ruby 3.14 477,092 478 3.12 0% 100% 2% 1%
Go 2.04 10,560 603 2.03 11% 10% 100% 1%
k-nucleotide
source secs mem gz cpu cpu load
Ruby 101.95 381,312 852 367.82 84% 98% 85% 95%
Go 15.02 149,248 1713 56.88 92% 94% 97% 96%
reverse-complement
source secs mem gz cpu cpu load
Ruby 4.03 505,656 509 7.14 51% 83% 37% 9%
Go 0.48 88,820 1278 0.86 32% 48% 63% 44%
n-body
source secs mem gz cpu cpu load
Ruby 723.69 8,916 1137 723.48 25% 86% 1% 9%
Go 21.52 832 1310 21.52 1% 1% 1% 100%
spectral-norm
source secs mem gz cpu cpu load
Ruby 141.49 50,156 835 544.76 96% 97% 96% 97%
Go 3.95 2,156 548 15.70 100% 99% 99% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Ruby 710.58 33,348 1426 2,761.73 99% 99% 95% 97%
Go 15.84 1,384 900 63.01 99% 100% 100% 100%
fasta
source secs mem gz cpu cpu load
Ruby 108.36 107,984 973 108.32 7% 10% 75% 10%
Go 1.98 3,312 1344 5.63 60% 71% 78% 78%
mandelbrot
source secs mem gz cpu cpu load
Ruby 463.95 69,656 1019 1,852.06 100% 100% 100% 100%
Go 5.64 31,052 894 22.41 99% 99% 99% 100%
Ruby

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

Go

go version go1.8 linux/amd64