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.51 352,804 798 61.51 77% 49% 43% 40%
pidigits
source secs mem gz cpu cpu load
Ruby 3.14 477,092 478 3.12 0% 100% 2% 1%
Go 2.02 8,588 603 2.02 100% 0% 1% 1%
binary-trees
source secs mem gz cpu cpu load
Ruby 54.24 510,868 1078 153.99 73% 98% 67% 72%
Go 34.77 269,068 654 132.04 95% 97% 95% 95%
k-nucleotide
source secs mem gz cpu cpu load
Ruby 101.95 381,312 852 367.82 84% 98% 85% 95%
Go 16.08 149,180 1582 59.44 95% 90% 90% 97%
reverse-complement
source secs mem gz cpu cpu load
Ruby 4.03 505,656 509 7.14 51% 83% 37% 9%
Go 0.49 88,056 1278 0.87 27% 43% 28% 81%
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% 100% 0% 0%
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,148 548 15.71 100% 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 15.81 1,372 900 62.92 100% 100% 99% 99%
fasta
source secs mem gz cpu cpu load
Ruby 108.36 107,984 973 108.32 7% 10% 75% 10%
Go 1.98 3,044 1344 5.65 75% 82% 47% 85%
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,312 894 22.41 99% 100% 99% 99%
Ruby

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

Go

go version go1.8.1 linux/amd64