The Computer Language
Benchmarks Game

Rust programs versus C gcc

by benchmark task performance

regex-dna
source secs KB gz cpu cpu load
Rust 3.18 203,436 669 3.17 1% 2% 1% 100%
C gcc 5.09 323,572 2579 5.08 0% 1% 0% 100%
k-nucleotide
source secs KB gz cpu cpu load
Rust 28.22 145,904 2078 28.19 1% 1% 1% 100%
C gcc 32.04 181,108 2280 32.01 1% 0% 0% 100%
pidigits
source secs KB gz cpu cpu load
Rust 1.73 7,012 1420 1.73 2% 0% 1% 99%
C gcc 1.73 2,072 448 1.72 1% 1% 0% 100%
mandelbrot
source secs KB gz cpu cpu load
Rust 20.12 59,648 868 20.11 1% 1% 0% 100%
C gcc 19.75 32,496 694 19.74 0% 0% 0% 100%
reverse-complement
source secs KB gz cpu cpu load
Rust 0.79 258,296 1985 0.79 1% 0% 1% 100%
C gcc 0.67 251,684 741 0.66 0% 1% 0% 100%
n-body
source secs KB gz cpu cpu load
Rust 14.60 6,420 1799 14.59 1% 0% 0% 100%
C gcc 10.50 1,008 1490 10.49 0% 1% 1% 100%
fasta
source secs KB gz cpu cpu load
Rust 5.03 6,408 1211 5.03 0% 1% 1% 100%
C gcc 3.29 748 1261 3.29 0% 0% 1% 100%
binary-trees
source secs KB gz cpu cpu load
Rust 14.32 119,744 791 14.31 1% 0% 1% 100%
C gcc 9.28 150,364 906 9.26 0% 0% 1% 100%
fasta-redux
source secs KB gz cpu cpu load
Rust 2.87 6,440 1764 2.87 14% 5% 1% 100%
C gcc 1.57 680 1321 1.57 1% 0% 1% 100%
spectral-norm
source secs KB gz cpu cpu load
Rust 15.71 8,524 1265 15.70 1% 0% 1% 100%
C gcc 7.85 1,692 569 7.85 0% 1% 0% 100%
fannkuch-redux
source secs KB gz cpu cpu load
Rust 52.24 8,436 1191 52.22 1% 0% 0% 100%
C gcc 22.63 808 1183 22.62 1% 2% 1% 100%
Rust

rustc 1.3.0 (9a92aaf19 2015-09-15)

C gcc

gcc version 4.9.2 (Ubuntu 4.9.2-10ubuntu13)