The Computer Language
Benchmarks Game

Rust versus Go fastest programs

Always look at the source code.

These are only the fastest programs. Look at the other programs. They may seem more-like a fair comparison to you.

binary-trees
source secs mem gz busy cpu load
Rust 3.31 199,852 721 12.01 88% 88% 87% 100%
Go 26.46 572,836 1007 89.76 86% 84% 85% 85%
n-body
source secs mem gz busy cpu load
Rust 6.07 940 1753 6.16 100% 1% 0% 0%
Go 21.25 1,588 1310 21.82 2% 0% 100% 1%
mandelbrot
source secs mem gz busy cpu load
Rust 1.70 30,544 1332 6.69 98% 98% 99% 98%
Go 5.47 31,088 905 21.77 100% 99% 99% 99%
regex-redux
source secs mem gz busy cpu load
Rust 2.12 153,104 986 3.14 17% 14% 33% 84%
Go 6.84 340,376 810 9.43 30% 43% 13% 52%
reverse-complement
source secs mem gz busy cpu load
Rust 1.69 994,564 1330 2.98 45% 26% 47% 59%
Go 3.83 1,782,940 1338 6.67 21% 74% 16% 62%
k-nucleotide
source secs mem gz busy cpu load
Rust 5.38 135,192 1749 17.05 64% 73% 89% 91%
Go 11.77 160,184 1607 44.52 94% 98% 94% 92%
spectral-norm
source secs mem gz busy cpu load
Rust 1.98 2,244 1126 7.89 99% 100% 99% 99%
Go 3.96 2,752 548 15.74 99% 99% 99% 99%
fasta
source secs mem gz busy cpu load
Rust 1.51 2,044 1906 4.60 74% 73% 82% 75%
Go 2.08 3,560 1358 5.61 80% 37% 76% 78%
fannkuch-redux
source secs mem gz busy cpu load
Rust 11.08 944 1016 43.52 100% 94% 100% 99%
Go 14.79 1,532 969 58.94 100% 100% 100% 100%
pidigits
source secs mem gz busy cpu load
Rust 1.75 3,036 1366 1.77 100% 0% 1% 1%
Go 2.10 8,448 603 2.17 1% 48% 55% 0%
Rust

rustc 1.40.0 (73528e339 2019-12-16)
LLVM version: 9.0

Go

go version go1.13 linux/amd64