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.61 1,200 1020 29.86 94% 100% 99% 99%
pidigits
source secs mem gz busy cpu load
Go 1.00 8,952 683 1.04 0% 3% 99% 2%
Rust 0.72 2,660 799 0.77 100% 0% 0% 7%
fasta
source secs mem gz busy cpu load
Go 1.28 11,276 1404 3.78 65% 86% 81% 65%
Rust 0.76 1,836 2529 1.53 99% 63% 38% 0%
n-body
source secs mem gz busy cpu load
Go 6.38 1,896 1200 6.43 0% 100% 1% 0%
Rust 3.42 872 1753 3.44 0% 100% 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,660 817 2.86 100% 100% 100% 100%
k-nucleotide
source secs mem gz busy cpu load
Go 8.30 160,300 1607 31.96 96% 98% 96% 95%
Rust 2.68 159,104 1691 10.03 92% 91% 100% 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 498,880 3040 0.76 61% 23% 60% 24%
mandelbrot
source secs mem gz busy cpu load
Go 3.75 34,832 894 14.92 100% 99% 99% 100%
Rust 0.93 32,648 763 3.70 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.77 147,384 2458 2.00 55% 59% 55% 91%
binary-trees
source secs mem gz busy cpu load
Go 12.80 385,036 1017 43.87 85% 87% 85% 86%
Rust 1.02 198,720 765 3.64 87% 86% 85% 99%
Go

go version go1.16 linux/amd64

Rust

rustc 1.53.0 (53cb7b09b 2021-06-17)
LLVM version: 12.0.1