The Computer Language
Benchmarks Game

Ruby programs versus Go

by benchmark task performance

regex-redux
source secs mem gz cpu cpu load
Ruby 25.64 311,964 431 25.63 6% 4% 60% 31%
Go 28.49 318,144 802 59.96 74% 48% 41% 48%
binary-trees
source secs mem gz cpu cpu load
Ruby 47.66 511,724 1083 137.38 66% 90% 70% 63%
Go 34.42 268,188 654 130.26 96% 94% 95% 94%
pidigits
source secs mem gz cpu cpu load
Ruby 2.97 306,652 485 2.96 1% 0% 3% 100%
Go 2.03 9,428 603 2.03 0% 0% 0% 100%
k-nucleotide
source secs mem gz cpu cpu load
Ruby 95.27 381,212 858 342.07 97% 86% 86% 91%
Go 14.98 147,704 1722 55.60 97% 88% 92% 95%
reverse-complement
source secs mem gz cpu cpu load
Ruby 3.73 571,404 517 7.00 49% 34% 96% 10%
Go 0.54 132,404 1338 0.91 25% 28% 58% 60%
n-body
source secs mem gz cpu cpu load
Ruby 641.41 8,848 1137 641.26 8% 93% 0% 0%
Go 21.47 1,568 1200 21.47 78% 1% 1% 22%
spectral-norm
source secs mem gz cpu cpu load
Ruby 119.33 49,312 835 461.61 97% 97% 97% 97%
Go 3.94 2,320 548 15.69 99% 100% 100% 99%
fasta
source secs mem gz cpu cpu load
Ruby 99.67 106,544 1002 99.65 0% 0% 100% 0%
Go 2.17 3,404 1358 5.83 58% 69% 66% 77%
fannkuch-redux
source secs mem gz cpu cpu load
Ruby 671.17 30,416 1432 2,613.66 98% 100% 100% 92%
Go 14.44 1,560 900 57.53 100% 100% 100% 100%
mandelbrot
source secs mem gz cpu cpu load
Ruby 520.83 127,152 925 2,081.07 100% 100% 100% 100%
Go 5.48 30,704 905 21.74 100% 100% 99% 100%
Ruby

ruby 2.5.0p0 (2017-12-25 revision 61468) [x86_64-linux]

Go

go version go1.9 linux/amd64