The Computer Language
Benchmarks Game

Rust programs versus C gcc

by benchmark task performance

k-nucleotide
secs KB gz cpu cpu load
Rust 25.42 149,520 2027 25.40 0% 100% 1% 100%
C gcc 34.18 127,896 1535 34.16 1% 1% 0% 100%
mandelbrot
secs KB gz cpu cpu load
Rust 21.90 59,444 868 21.89 1% 100% 1% 100%
C gcc 22.37 32,124 694 22.36 0% 1% 1% 100%
pidigits
secs KB gz cpu cpu load
Rust 2.51 6,296 1420 2.51 1% 100% 0% 100%
C gcc 2.50 1,972 448 2.50 1% 0% 0% 100%
reverse-complement
secs KB gz cpu cpu load
Rust 0.83 264,332 1807 0.83 1% 100% 1% 100%
C gcc 0.78 251,604 741 0.77 6% 0% 0% 100%
regex-dna
secs KB gz cpu cpu load
Rust 7.00 223,688 669 6.99 0% 100% 2% 100%
C gcc 5.53 295,572 2579 5.51 0% 1% 1% 100%
binary-trees
secs KB gz cpu cpu load
Rust 12.68 81,056 791 12.67 0% 1% 1% 100%
C gcc 9.62 100,812 906 9.61 0% 1% 1% 100%
spectral-norm
secs KB gz cpu cpu load
Rust 13.87 36,796 1251 13.86 1% 100% 0% 100%
C gcc 7.85 1,628 569 7.85 0% 1% 1% 100%
fasta-redux
secs KB gz cpu cpu load
Rust 2.85 6,232 1764 2.84 0% 100% 1% 100%
C gcc 1.57 568 1402 1.56 0% 1% 2% 99%
fasta
secs KB gz cpu cpu load
Rust 5.69 6,224 1211 5.68 1% 100% 1% 100%
C gcc 2.77 644 1261 2.77 0% 1% 2% 100%
fannkuch-redux
secs KB gz cpu cpu load
Rust 50.46 16,452 1191 50.45 1% 1% 100% 100%
C gcc 24.20 640 1183 24.19 1% 1% 1% 100%
n-body
secs KB gz cpu cpu load
Rust 24.05 6,220 1799 24.04 1% 0% 100% 100%
C gcc 10.01 752 1490 10.01 0% 1% 1% 100%
Rust

rustc 1.8.0 (db2939409 2016-04-11)

C gcc

gcc version 5.3.1 20160413 (Ubuntu 5.3.1-14ubuntu2)