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.

regex-redux
source secs mem gz busy cpu load
Rust 2.12 152,860 986 3.14 84% 17% 31% 17%
Go 44.76 405,360 829 106.73 55% 52% 66% 65%
binary-trees
source secs mem gz busy cpu load
Rust 3.37 199,752 721 12.26 100% 88% 88% 87%
Go 25.68 361,532 950 101.67 99% 99% 99% 99%
n-body
source secs mem gz busy cpu load
Rust 5.98 936 1753 6.10 1% 0% 69% 32%
Go 21.26 1,884 1310 21.41 38% 62% 0% 0%
mandelbrot
source secs mem gz busy cpu load
Rust 1.70 30,560 1332 6.69 98% 98% 98% 99%
Go 5.48 31,196 894 21.83 100% 100% 99% 99%
k-nucleotide
source secs mem gz busy cpu load
Rust 5.36 135,048 1749 17.00 91% 55% 81% 90%
Go 12.58 150,308 1722 47.83 95% 95% 95% 95%
reverse-complement
source secs mem gz busy cpu load
Rust 1.68 994,588 1330 2.94 47% 25% 79% 24%
Go 3.72 826,396 611 3.93 88% 1% 4% 13%
spectral-norm
source secs mem gz busy cpu load
Rust 1.97 2,112 1126 7.87 99% 99% 100% 100%
Go 3.96 2,692 548 15.74 99% 99% 99% 99%
fasta
source secs mem gz busy cpu load
Rust 1.51 2,044 1906 4.58 82% 74% 73% 75%
Go 2.07 3,744 1358 5.52 79% 80% 27% 81%
fannkuch-redux
source secs mem gz busy cpu load
Rust 11.08 872 1016 43.55 99% 94% 100% 100%
Go 14.75 3,484 969 58.94 100% 100% 100% 100%
pidigits
source secs mem gz busy cpu load
Rust 1.75 3,052 1366 1.79 100% 2% 0% 1%
Go 2.04 8,732 603 2.09 10% 13% 28% 52%
Rust

rustc 1.42.0 (b8cedc004 2020-03-09)
LLVM version: 9.0

Go

go version go1.14 linux/amd64