The Computer Language
Benchmarks Game

Go versus Rust 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.

pidigits
source secs mem gz busy cpu load
Go 2.04 8,724 603 2.36 20% 32% 33% 31%
Rust 1.75 2,984 1420 1.83 0% 2% 3% 100%
fannkuch-redux
source secs mem gz busy cpu load
Go 14.93 3,484 969 59.67 100% 100% 100% 100%
Rust 11.06 1,020 1016 43.39 100% 99% 100% 93%
fasta
source secs mem gz busy cpu load
Go 2.11 4,228 1358 5.66 69% 65% 64% 70%
Rust 1.51 2,172 1961 4.77 76% 86% 77% 77%
spectral-norm
source secs mem gz busy cpu load
Go 4.12 2,704 548 15.93 96% 98% 97% 96%
Rust 1.99 2,428 1126 7.91 99% 100% 99% 99%
reverse-complement
source secs mem gz busy cpu load
Go 3.73 826,488 611 4.10 88% 6% 2% 14%
Rust 1.68 994,920 1330 2.91 46% 79% 24% 25%
k-nucleotide
source secs mem gz busy cpu load
Go 12.67 150,584 1722 47.44 95% 90% 93% 96%
Rust 5.58 134,504 1841 16.64 73% 93% 57% 76%
regex-redux
source secs mem gz busy cpu load
Go 7.21 326,552 810 10.19 22% 18% 87% 14%
Rust 2.23 153,800 986 3.28 14% 16% 85% 32%
mandelbrot
source secs mem gz busy cpu load
Go 5.55 30,300 894 22.11 99% 99% 99% 100%
Rust 1.71 32,704 1332 6.73 98% 98% 98% 100%
n-body
source secs mem gz busy cpu load
Go 21.26 1,888 1310 22.28 3% 0% 100% 2%
Rust 5.98 688 1753 6.01 0% 0% 100% 1%
binary-trees
source secs mem gz busy cpu load
Go 25.19 397,116 1007 86.01 88% 86% 84% 83%
Rust 3.30 174,904 721 11.87 87% 88% 87% 99%
Go

go version go1.14 linux/amd64

Rust

rustc 1.43.0 (4fb7144ed 2020-04-20)
LLVM version: 9.0