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.30 111,692 721 4.69 99% 86% 86% 88%
Go 12.36 396,032 1007 43.05 88% 86% 89% 85%
mandelbrot
source secs mem gz busy cpu load
Rust 0.94 26,316 719 3.71 99% 98% 100% 98%
Go 3.73 28,764 905 14.88 100% 99% 99% 100%
k-nucleotide
source secs mem gz busy cpu load
Rust 2.76 132,424 1578 9.03 69% 100% 67% 91%
Go 8.03 150,544 1722 30.53 97% 96% 95% 92%
regex-redux
source secs mem gz busy cpu load
Rust 1.28 153,836 986 1.79 13% 83% 13% 31%
Go 3.57 382,828 810 5.71 21% 42% 47% 51%
spectral-norm
source secs mem gz busy cpu load
Rust 0.71 2,436 1126 2.86 100% 100% 100% 100%
Go 1.43 2,668 548 5.70 99% 99% 99% 100%
n-body
source secs mem gz busy cpu load
Rust 3.33 688 1753 3.42 0% 100% 2% 1%
Go 6.34 1,792 1200 6.44 1% 100% 0% 0%
reverse-complement
source secs mem gz busy cpu load
Rust 0.74 994,956 1330 1.36 47% 59% 49% 28%
Go 1.38 1,465,376 1338 2.54 51% 47% 38% 50%
pidigits
source secs mem gz busy cpu load
Rust 0.88 2,884 1306 0.89 1% 0% 0% 100%
Go 1.23 8,580 603 1.26 1% 50% 2% 50%
fasta
source secs mem gz busy cpu load
Rust 0.93 2,180 1906 3.08 80% 89% 81% 81%
Go 1.20 11,452 1404 3.62 73% 70% 84% 74%
fannkuch-redux
source secs mem gz busy cpu load
Rust 6.87 1,016 1016 26.97 100% 99% 94% 100%
Go 8.51 2,732 969 34.00 100% 100% 100% 100%
Rust

rustc 1.44.1 (c7087fe00 2020-06-17)
LLVM version: 9.0

Go

go version go1.14.4 linux/amd64