The Computer Language
Benchmarks Game

Rust versus C gcc fastest programs

by faster benchmark performance

reverse-complement
source secs mem gz cpu cpu load
Rust 1.60 995,212 1376 2.73 24% 25% 96% 30%
C gcc 1.76 994,524 1438 3.98 46% 96% 43% 44%
k-nucleotide
source secs mem gz cpu cpu load
Rust 5.98 137,956 1648 18.00 78% 49% 90% 85%
C gcc 6.27 130,024 1506 17.46 68% 47% 65% 100%
pidigits
source secs mem gz cpu cpu load
Rust 1.74 4,520 1366 1.74 1% 3% 0% 99%
C gcc 1.75 2,708 452 1.75 1% 100% 0% 1%
spectral-norm
source secs mem gz cpu cpu load
Rust 1.97 2,600 1126 7.86 100% 100% 100% 99%
C gcc 1.98 1,160 1139 7.86 99% 99% 99% 99%
mandelbrot
source secs mem gz cpu cpu load
Rust 1.74 33,712 1332 6.86 98% 100% 98% 98%
C gcc 1.64 26,188 1135 6.54 100% 100% 100% 99%
fasta
source secs mem gz cpu cpu load
Rust 1.46 3,112 1906 4.95 84% 83% 84% 89%
C gcc 1.36 2,920 2268 5.41 100% 99% 100% 99%
binary-trees
source secs mem gz cpu cpu load
Rust 4.14 175,692 721 15.18 90% 90% 91% 100%
C gcc 3.72 117,408 836 11.80 76% 95% 75% 72%
fannkuch-redux
source secs mem gz cpu cpu load
Rust 9.87 1,848 1020 38.71 100% 95% 100% 100%
C gcc 8.72 916 910 34.23 100% 100% 95% 99%
n-body
source secs mem gz cpu cpu load
Rust 13.25 1,808 1805 13.25 0% 0% 1% 100%
C gcc 9.36 1,088 1490 9.35 100% 0% 0% 0%
regex-redux
source secs mem gz cpu cpu load
Rust 2.44 194,804 765 3.87 85% 41% 20% 16%
C gcc 1.46 152,124 1397 3.39 46% 100% 43% 47%
Rust

rustc 1.30.0 (da5f414c2 2018-10-24)
LLVM version 7.0.0

C gcc

gcc (Ubuntu 8.2.0-7ubuntu1) 8.2.0