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.61 995,100 1376 2.72 25% 81% 39% 28%
C gcc 1.75 994,468 1438 3.96 48% 44% 95% 44%
spectral-norm
source secs mem gz cpu cpu load
Rust 1.98 2,472 1126 7.86 100% 100% 99% 100%
C gcc 1.99 1,292 569 7.89 99% 99% 99% 99%
pidigits
source secs mem gz cpu cpu load
Rust 1.74 4,488 1366 1.74 1% 100% 1% 0%
C gcc 1.75 2,728 452 1.74 1% 2% 0% 100%
k-nucleotide
source secs mem gz cpu cpu load
Rust 5.34 138,504 1749 17.16 87% 100% 78% 58%
C gcc 5.07 130,008 1506 15.25 88% 84% 58% 73%
mandelbrot
source secs mem gz cpu cpu load
Rust 1.75 34,176 1332 6.86 98% 98% 100% 98%
C gcc 1.64 26,416 1135 6.55 100% 100% 99% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Rust 9.60 1,752 1020 37.68 100% 96% 99% 99%
C gcc 8.72 980 910 34.43 98% 97% 100% 100%
fasta
source secs mem gz cpu cpu load
Rust 1.47 2,988 1906 4.97 88% 83% 90% 84%
C gcc 1.32 2,892 2268 5.22 100% 100% 99% 99%
n-body
source secs mem gz cpu cpu load
Rust 13.31 1,768 1805 13.31 0% 0% 1% 100%
C gcc 9.17 1,228 1490 9.17 100% 0% 0% 1%
binary-trees
source secs mem gz cpu cpu load
Rust 3.98 165,920 721 14.61 90% 100% 90% 89%
C gcc 2.55 130,516 836 7.77 82% 66% 64% 94%
regex-redux
source secs mem gz cpu cpu load
Rust 2.54 204,160 765 3.95 55% 30% 56% 18%
C gcc 1.45 152,208 1397 3.40 46% 49% 42% 100%
Rust

rustc 1.29.0 (aa3ca1994 2018-09-11)
LLVM version 5.0.1

C gcc

gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0