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.21 323,820 802 59.87 69% 46% 50% 48%
pidigits
source secs mem gz cpu cpu load
Ruby 2.97 306,652 485 2.96 1% 0% 3% 100%
Go 2.02 9,256 603 2.02 0% 0% 100% 0%
binary-trees
source secs mem gz cpu cpu load
Ruby 47.66 511,724 1083 137.38 66% 90% 70% 63%
Go 28.80 434,632 654 109.58 94% 95% 95% 97%
k-nucleotide
source secs mem gz cpu cpu load
Ruby 95.27 381,212 858 342.07 97% 86% 86% 91%
Go 12.77 148,052 1722 47.35 87% 97% 94% 95%
reverse-complement
source secs mem gz cpu cpu load
Ruby 32.71 497,404 264 32.69 100% 1% 1% 0%
Go 4.00 824,356 611 4.16 1% 35% 68% 2%
n-body
source secs mem gz cpu cpu load
Ruby 641.41 8,848 1137 641.26 8% 93% 0% 0%
Go 21.37 1,536 1310 21.38 0% 0% 100% 0%
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,344 548 15.71 100% 100% 100% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Ruby 671.17 30,416 1432 2,613.66 98% 100% 100% 92%
Go 14.72 1,540 900 58.65 100% 100% 99% 100%
fasta
source secs mem gz cpu cpu load
Ruby 99.67 106,544 1002 99.65 0% 0% 100% 0%
Go 2.08 3,640 1358 5.69 84% 66% 70% 56%
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,912 905 21.79 99% 99% 99% 100%
Ruby

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

Go

go version go1.10 linux/amd64