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.

fannkuch-redux
source secs mem gz busy cpu load
Go 8.28 2,428 969 33.10 100% 100% 100% 100%
Rust 7.28 1,168 1016 28.82 100% 97% 100% 100%
pidigits
source secs mem gz busy cpu load
Go 0.86 8,980 683 0.88 2% 0% 0% 100%
Rust 0.74 2,888 1420 0.76 0% 0% 100% 3%
fasta
source secs mem gz busy cpu load
Go 1.20 11,364 1404 3.67 80% 75% 73% 77%
Rust 0.77 1,848 2529 1.57 99% 1% 4% 100%
n-body
source secs mem gz busy cpu load
Go 6.38 1,800 1200 6.44 0% 0% 0% 100%
Rust 3.31 836 1767 3.36 100% 1% 0% 1%
spectral-norm
source secs mem gz busy cpu load
Go 1.43 2,088 548 5.67 99% 99% 99% 99%
Rust 0.71 2,696 1055 2.86 100% 100% 100% 100%
k-nucleotide
source secs mem gz busy cpu load
Go 8.29 160,156 1607 32.00 96% 96% 98% 96%
Rust 2.76 159,224 1691 10.20 90% 98% 91% 90%
reverse-complement
source secs mem gz busy cpu load
Go 1.43 1,467,392 1338 2.67 48% 38% 55% 45%
Rust 0.46 499,024 3040 0.83 26% 80% 47% 28%
mandelbrot
source secs mem gz busy cpu load
Go 3.75 34,848 894 14.94 99% 100% 99% 99%
Rust 0.93 32,788 763 3.69 100% 100% 99% 100%
regex-redux
source secs mem gz busy cpu load
Go 3.61 374,916 810 5.95 47% 34% 20% 64%
Rust 0.78 146,236 2458 1.99 53% 53% 61% 90%
binary-trees
source secs mem gz busy cpu load
Go 6.74 280,176 701 26.36 98% 98% 98% 97%
Rust 1.07 198,540 765 3.76 84% 100% 84% 83%
Go

go version go1.15.2 linux/amd64

Rust

rustc 1.48.0 (7eac88abb 2020-11-16)
LLVM version: 11.0