The Computer Language
Benchmarks Game

Rust programs versus C gcc

by benchmark task performance

k-nucleotide
source secs mem gz cpu cpu load
Rust 4.98 137,872 1748 15.58 72% 88% 57% 98%
C gcc 6.67 130,160 1506 19.33 76% 50% 92% 75%
reverse-complement
source secs mem gz cpu cpu load
Rust 0.36 250,724 1376 0.65 26% 95% 35% 27%
C gcc 0.48 200,492 820 0.66 4% 19% 25% 98%
pidigits
source secs mem gz cpu cpu load
Rust 1.74 4,420 1366 1.74 100% 1% 0% 1%
C gcc 1.74 2,716 452 1.74 100% 1% 1% 2%
fasta
source secs mem gz cpu cpu load
Rust 1.48 2,980 1906 4.59 76% 78% 78% 83%
C gcc 1.32 2,912 2268 5.25 100% 99% 100% 99%
spectral-norm
source secs mem gz cpu cpu load
Rust 2.32 2,568 817 9.23 100% 100% 100% 99%
C gcc 2.00 1,300 569 7.89 99% 99% 100% 99%
mandelbrot
source secs mem gz cpu cpu load
Rust 2.02 34,644 1332 8.00 99% 99% 100% 99%
C gcc 1.64 29,424 1135 6.53 99% 100% 100% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Rust 11.04 1,768 1020 43.14 96% 99% 98% 99%
C gcc 8.66 980 910 34.22 100% 97% 100% 100%
n-body
source secs mem gz cpu cpu load
Rust 13.57 1,728 1480 13.56 0% 0% 1% 100%
C gcc 9.12 1,176 1490 9.12 1% 100% 2% 2%
binary-trees
source secs mem gz cpu cpu load
Rust 3.95 171,796 721 14.30 89% 90% 88% 97%
C gcc 2.44 133,956 836 7.57 80% 65% 68% 100%
regex-redux
source secs mem gz cpu cpu load
Rust 3.00 196,176 804 4.38 85% 16% 30% 16%
C gcc 1.48 152,352 1230 4.05 59% 99% 57% 61%
Rust

rustc 1.21.0 (3b72af97e 2017-10-09)

C gcc

gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0