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 1.20 200,160 721 4.27 87% 86% 86% 98%
Go 12.57 352,428 1017 43.46 89% 87% 85% 85%
mandelbrot
source secs mem gz busy cpu load
Rust 0.92 26,112 757 3.67 100% 100% 100% 100%
Go 3.75 33,820 905 14.95 100% 100% 100% 100%
k-nucleotide
source secs mem gz busy cpu load
Rust 2.64 131,408 1578 8.41 66% 86% 92% 75%
Go 8.16 150,376 1722 31.09 97% 97% 96% 91%
regex-redux
source secs mem gz busy cpu load
Rust 1.30 153,228 986 1.82 12% 85% 28% 15%
Go 3.55 375,092 810 5.86 30% 46% 21% 68%
spectral-norm
source secs mem gz busy cpu load
Rust 0.72 2,448 817 2.84 100% 99% 100% 99%
Go 1.44 2,340 548 5.69 99% 99% 99% 99%
reverse-complement
source secs mem gz busy cpu load
Rust 0.74 994,912 1330 1.34 27% 81% 46% 27%
Go 1.43 1,467,692 1338 2.74 63% 42% 40% 47%
n-body
source secs mem gz busy cpu load
Rust 3.42 1,844 1753 3.44 100% 0% 0% 0%
Go 6.38 1,768 1200 6.38 0% 0% 0% 100%
pidigits
source secs mem gz busy cpu load
Rust 0.88 2,904 1420 0.90 0% 100% 2% 0%
Go 1.25 9,120 603 1.24 0% 48% 0% 51%
fasta
source secs mem gz busy cpu load
Rust 0.94 2,180 1961 3.12 81% 81% 81% 89%
Go 1.20 10,852 1404 3.64 79% 71% 74% 79%
fannkuch-redux
source secs mem gz busy cpu load
Rust 7.54 1,012 1016 29.62 95% 98% 100% 100%
Go 8.28 2,432 969 33.06 100% 100% 100% 100%
Rust

rustc 1.46.0 (04488afe3 2020-08-24)
LLVM version: 9.0

Go

go version go1.15.2 linux/amd64