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 28.49 318,144 802 59.96 74% 48% 41% 48%
pidigits
source secs mem gz cpu cpu load
Ruby 3.14 477,092 478 3.12 0% 100% 2% 1%
Go 2.03 9,428 603 2.03 0% 0% 0% 100%
binary-trees
source secs mem gz cpu cpu load
Ruby 54.24 510,868 1078 153.99 73% 98% 67% 72%
Go 34.42 268,188 654 130.26 96% 94% 95% 94%
k-nucleotide
source secs mem gz cpu cpu load
Ruby 101.95 381,312 852 367.82 84% 98% 85% 95%
Go 14.98 147,704 1722 55.60 97% 88% 92% 95%
reverse-complement
source secs mem gz cpu cpu load
Ruby 4.03 505,656 509 7.14 51% 83% 37% 9%
Go 0.54 132,404 1338 0.91 25% 28% 58% 60%
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,568 1200 21.47 78% 1% 1% 22%
spectral-norm
source secs mem gz cpu cpu load
Ruby 141.49 50,156 835 544.76 96% 97% 96% 97%
Go 3.94 2,320 548 15.69 99% 100% 100% 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.44 1,560 900 57.53 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,404 1358 5.83 58% 69% 66% 77%
mandelbrot
source secs mem gz cpu cpu load
Ruby 463.95 69,656 1019 1,852.06 100% 100% 100% 100%
Go 5.48 30,704 905 21.74 100% 100% 99% 100%
Ruby

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

Go

go version go1.9 linux/amd64