The Computer Language
Benchmarks Game

Go versus Rust fastest programs

Always look at the source code.

These are only the fastest programs. Do some of them use manually vectorized SIMD? Look at the other programs. They may seem more-like a fair comparison to you.

fannkuch-redux
source secs mem gz busy cpu load
Go 7.59 2,064 969 30.31 100% 100% 100% 100%
Rust 7.13 1,176 1020 28.07 99% 95% 100% 99%
pidigits
source secs mem gz busy cpu load
Go 1.00 8,952 683 1.04 0% 3% 99% 2%
Rust 0.71 2,912 799 0.72 0% 100% 1% 0%
fasta
source secs mem gz busy cpu load
Go 1.28 11,276 1404 3.78 65% 86% 81% 65%
Rust 0.77 1,884 2529 1.53 0% 1% 99% 99%
n-body
source secs mem gz busy cpu load
Go 6.38 1,896 1200 6.43 0% 100% 1% 0%
Rust 3.32 844 1767 3.43 100% 3% 0% 0%
spectral-norm
source secs mem gz busy cpu load
Go 1.44 2,356 548 5.71 99% 99% 99% 99%
Rust 0.71 2,668 1055 2.85 100% 100% 99% 100%
k-nucleotide
source secs mem gz busy cpu load
Go 8.30 160,300 1607 31.96 96% 98% 96% 95%
Rust 2.75 159,068 1691 10.20 99% 90% 91% 91%
reverse-complement
source secs mem gz busy cpu load
Go 1.42 1,344,600 1338 2.66 57% 36% 71% 24%
Rust 0.45 499,100 3040 0.78 23% 24% 64% 61%
mandelbrot
source secs mem gz busy cpu load
Go 3.75 34,832 894 14.92 100% 99% 99% 100%
Rust 0.92 32,588 763 3.67 99% 100% 100% 100%
regex-redux
source secs mem gz busy cpu load
Go 3.94 323,252 810 6.14 74% 30% 19% 33%
Rust 0.79 143,672 2458 1.99 53% 59% 52% 90%
binary-trees
source secs mem gz busy cpu load
Go 6.73 299,572 701 26.34 98% 97% 98% 98%
Rust 1.04 198,844 765 3.74 87% 86% 87% 100%
Go

go version go1.16 linux/amd64

Rust

rustc 1.51.0 (2fd73fabe 2021-03-23)
LLVM version: 11.0.1