The Computer Language
Benchmarks Game

Rust versus Go fastest programs

Always look at the source code.

These are only the fastest programs. Do some of them use manually vectorized SIMD? 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.04 198,652 765 3.71 86% 85% 100% 86%
Go 6.68 266,164 745 26.59 100% 99% 99% 100%
regex-redux
source secs mem gz busy cpu load
Rust 0.77 146,736 2458 2.00 90% 54% 55% 61%
Go 3.94 323,252 810 6.14 74% 30% 19% 33%
mandelbrot
source secs mem gz busy cpu load
Rust 0.92 32,240 757 3.66 100% 99% 99% 100%
Go 3.75 34,832 894 14.92 100% 99% 99% 100%
reverse-complement
source secs mem gz busy cpu load
Rust 0.45 499,168 3040 0.76 24% 22% 23% 100%
Go 1.42 1,344,600 1338 2.66 57% 36% 71% 24%
k-nucleotide
source secs mem gz busy cpu load
Rust 2.78 159,256 1691 10.20 90% 90% 90% 97%
Go 8.30 160,300 1607 31.96 96% 98% 96% 95%
spectral-norm
source secs mem gz busy cpu load
Rust 0.71 2,544 932 2.85 99% 100% 100% 100%
Go 1.44 2,356 548 5.71 99% 99% 99% 99%
n-body
source secs mem gz busy cpu load
Rust 3.31 844 1767 3.32 0% 0% 0% 100%
Go 6.38 1,896 1200 6.43 0% 100% 1% 0%
fasta
source secs mem gz busy cpu load
Rust 0.77 1,820 2529 1.54 99% 99% 1% 1%
Go 1.28 11,276 1404 3.78 65% 86% 81% 65%
pidigits
source secs mem gz busy cpu load
Rust 0.88 2,940 1366 0.88 100% 0% 0% 0%
Go 1.00 8,952 683 1.04 0% 3% 99% 2%
fannkuch-redux
source secs mem gz busy cpu load
Rust 7.15 1,172 1020 28.09 99% 95% 100% 99%
Go 7.59 2,064 969 30.31 100% 100% 100% 100%
Rust

rustc 1.50.0 (cb75ad5db 2021-02-10)
LLVM version 11.0.0

Go

go version go1.16 linux/amd64