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.10 8,448 603 2.17 1% 48% 55% 0%
Rust 1.75 3,060 1366 1.83 2% 2% 100% 1%
fasta
source secs mem gz busy cpu load
Go 2.08 3,560 1358 5.61 80% 37% 76% 78%
Rust 1.51 2,036 1906 4.59 74% 74% 82% 74%
fannkuch-redux
source secs mem gz busy cpu load
Go 14.79 1,532 969 58.94 100% 100% 100% 100%
Rust 10.42 876 1016 40.80 100% 93% 99% 99%
spectral-norm
source secs mem gz busy cpu load
Go 3.96 2,752 548 15.74 99% 99% 99% 99%
Rust 1.97 2,220 1126 7.88 100% 99% 99% 100%
reverse-complement
source secs mem gz busy cpu load
Go 3.83 1,782,940 1338 6.67 21% 74% 16% 62%
Rust 1.69 994,656 1330 2.96 25% 25% 46% 79%
k-nucleotide
source secs mem gz busy cpu load
Go 11.77 160,184 1607 44.52 94% 98% 94% 92%
Rust 5.17 135,372 1841 15.76 80% 100% 56% 69%
regex-redux
source secs mem gz busy cpu load
Go 6.84 340,376 810 9.43 30% 43% 13% 52%
Rust 2.13 153,508 986 3.18 84% 34% 15% 16%
mandelbrot
source secs mem gz busy cpu load
Go 5.47 31,088 905 21.77 100% 99% 99% 99%
Rust 1.70 32,308 1332 6.69 98% 98% 99% 98%
n-body
source secs mem gz busy cpu load
Go 21.25 1,588 1310 21.82 2% 0% 100% 1%
Rust 6.07 876 1753 6.18 0% 1% 100% 0%
binary-trees
source secs mem gz busy cpu load
Go 26.46 572,836 1007 89.76 86% 84% 85% 85%
Rust 3.32 199,724 721 12.07 88% 88% 87% 100%
Go

go version go1.13 linux/amd64

Rust

rustc 1.41.0 (5e1a79984 2020-01-27)
LLVM version: 9.0