The Computer Language
Benchmarks Game

Ruby programs versus Go

by benchmark task performance

pidigits
source secs mem gz cpu cpu load
Ruby 4.04 626,044 478 4.02 0% 1% 1% 100%
Go 3.86 8,032 729 3.85 2% 0% 0% 100%
binary-trees
source secs mem gz cpu cpu load
Ruby 179.60 117,640 402 179.49 1% 1% 100% 100%
Go 167.96 184,252 548 167.86 0% 1% 1% 100%
reverse-complement
source secs mem gz cpu cpu load
Ruby 6.17 541,352 509 6.14 0% 1% 1% 100%
Go 1.01 133,360 1278 1.00 3% 1% 1% 99%
k-nucleotide
source secs mem gz cpu cpu load
Ruby 672.83 160,276 420 672.50 0% 2% 99% 100%
Go 47.48 147,788 1582 47.45 1% 1% 0% 100%
fasta
source secs mem gz cpu cpu load
Ruby 197.80 197,072 904 197.62 1% 1% 100% 100%
Go 10.29 988 1036 10.28 0% 1% 0% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Ruby 2,604.22 7,112 384 2,603.32 1% 17% 72% 100%
Go 94.45 924 900 94.42 0% 1% 1% 100%
spectral-norm
source secs mem gz cpu cpu load
Ruby 520.06 7,584 326 519.86 0% 1% 100% 100%
Go 15.71 928 668 15.70 0% 1% 1% 100%
n-body
source secs mem gz cpu cpu load
Ruby 1,429.79 7,284 1137 1,429.24 1% 18% 83% 100%
Go 23.18 928 1310 23.17 1% 0% 0% 100%
mandelbrot
source secs mem gz cpu cpu load
Ruby 222.26 7,012 307 222.17 1% 0% 0% 100%
Go 1.72 2,764 894 1.72 1% 0% 1% 100%
Ruby

ruby 2.3.0p0 (2015-12-25 revision 53290) [i686-linux]

Go

go version go1.7 linux/386