The Computer Language
Benchmarks Game

Rust programs versus C gcc

by benchmark task performance

fasta
secs KB gz cpu cpu load
Rust 1.52 23,732 1887 4.61 74% 74% 75% 82%
C gcc 1.90 6,020 1914 5.21 90% 3% 87% 97%
k-nucleotide
secs KB gz cpu cpu load
Rust 9.94 155,760 2027 26.23 43% 83% 83% 58%
C gcc 12.17 189,420 2280 36.18 53% 97% 53% 96%
mandelbrot
secs KB gz cpu cpu load
Rust 5.11 63,664 868 20.15 99% 98% 99% 99%
C gcc 5.92 32,464 694 22.81 95% 100% 96% 95%
regex-dna
secs KB gz cpu cpu load
Rust 2.14 195,288 669 3.34 19% 19% 56% 64%
C gcc 2.45 317,952 2579 5.87 53% 51% 48% 92%
pidigits
secs KB gz cpu cpu load
Rust 1.73 7,092 1420 1.73 99% 1% 1% 1%
C gcc 1.73 1,988 448 1.72 1% 0% 1% 100%
binary-trees
secs KB gz cpu cpu load
Rust 3.81 129,700 791 14.10 94% 95% 99% 84%
C gcc 3.24 156,848 906 10.15 85% 62% 78% 92%
reverse-complement
secs KB gz cpu cpu load
Rust 0.71 256,280 1807 0.92 20% 74% 38% 3%
C gcc 0.50 251,028 741 0.76 82% 44% 12% 20%
fannkuch-redux
secs KB gz cpu cpu load
Rust 13.42 8,464 1191 53.10 96% 100% 100% 100%
C gcc 9.16 3,624 910 35.83 95% 99% 99% 99%
n-body
secs KB gz cpu cpu load
Rust 14.60 6,292 1799 14.60 0% 1% 100% 0%
C gcc 9.56 1,008 1490 9.56 1% 0% 0% 100%
spectral-norm
secs KB gz cpu cpu load
Rust 3.50 8,396 1251 13.58 97% 97% 97% 98%
C gcc 1.98 1,784 1139 7.87 99% 99% 100% 99%
fasta-redux
secs KB gz cpu cpu load
Rust 2.87 6,364 1764 2.87 0% 1% 100% 1%
C gcc 1.55 732 1321 1.54 1% 100% 0% 1%
Rust

rustc 1.6.0 (c30b771ad 2016-01-19)

C gcc

gcc (Ubuntu 5.2.1-22ubuntu2) 5.2.1 20151010