The Computer Language
Benchmarks Game

Rust programs versus C gcc

by benchmark task performance

reverse-complement
source secs mem gz cpu cpu load
Rust 1.62 995,084 1376 2.75 100% 24% 26% 24%
C gcc 1.75 994,468 1438 3.96 48% 44% 95% 44%
pidigits
source secs mem gz cpu cpu load
Rust 1.74 4,672 1366 1.74 1% 1% 100% 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.28 137,948 1749 16.08 69% 100% 52% 85%
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,132 1332 6.86 98% 100% 98% 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,816 1020 37.59 100% 94% 100% 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,980 1961 4.47 78% 75% 75% 82%
C gcc 1.32 2,892 2268 5.22 100% 100% 99% 99%
spectral-norm
source secs mem gz cpu cpu load
Rust 2.30 2,520 817 9.18 100% 100% 100% 100%
C gcc 1.99 1,292 569 7.89 99% 99% 99% 99%
n-body
source secs mem gz cpu cpu load
Rust 13.26 1,784 1480 13.25 3% 1% 100% 1%
C gcc 9.22 1,228 1490 9.22 100% 1% 1% 0%
binary-trees
source secs mem gz cpu cpu load
Rust 4.13 167,624 721 15.17 90% 100% 89% 90%
C gcc 2.54 130,292 836 7.76 78% 67% 64% 98%
regex-redux
source secs mem gz cpu cpu load
Rust 3.01 180,660 804 4.41 16% 16% 16% 100%
C gcc 1.50 152,088 1230 4.06 54% 59% 60% 100%
Rust

rustc 1.26.0 (a77568041 2018-05-07)

C gcc

gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0