The Computer Language
Benchmarks Game

Rust programs versus C gcc

by benchmark task performance

regex-dna
secs KB gz cpu cpu load
Rust 4.06 182,668 669 4.05 1% 100% 0% 100%
C gcc 5.46 288,880 2579 5.45 2% 100% 0% 100%
k-nucleotide
secs KB gz cpu cpu load
Rust 27.22 149,540 2027 27.20 1% 100% 1% 100%
C gcc 34.26 127,908 1535 34.24 1% 1% 100% 100%
mandelbrot
secs KB gz cpu cpu load
Rust 20.69 55,316 868 20.68 1% 1% 100% 100%
C gcc 22.37 31,976 799 22.36 1% 0% 100% 100%
pidigits
secs KB gz cpu cpu load
Rust 2.49 6,808 1420 2.49 1% 100% 1% 100%
C gcc 2.50 2,120 448 2.49 1% 1% 100% 100%
reverse-complement
secs KB gz cpu cpu load
Rust 0.85 262,248 1807 0.84 7% 100% 0% 100%
C gcc 0.76 251,292 741 0.76 1% 100% 0% 100%
binary-trees
secs KB gz cpu cpu load
Rust 13.07 81,068 791 13.06 2% 0% 1% 100%
C gcc 9.64 100,732 906 9.63 1% 0% 1% 100%
n-body
secs KB gz cpu cpu load
Rust 15.13 6,232 1799 15.12 1% 0% 100% 100%
C gcc 9.94 736 1490 9.94 1% 100% 1% 100%
fasta-redux
secs KB gz cpu cpu load
Rust 2.56 6,224 1764 2.55 4% 100% 0% 100%
C gcc 1.58 572 1402 1.58 1% 100% 1% 100%
spectral-norm
secs KB gz cpu cpu load
Rust 13.87 8,372 1251 13.86 1% 100% 0% 100%
C gcc 7.85 1,612 569 7.85 1% 1% 100% 100%
fasta
secs KB gz cpu cpu load
Rust 5.03 6,236 1211 5.03 1% 1% 100% 100%
C gcc 2.83 704 1261 2.82 2% 2% 100% 100%
fannkuch-redux
secs KB gz cpu cpu load
Rust 46.58 8,284 1191 46.56 2% 100% 1% 100%
C gcc 24.20 708 1183 24.19 1% 91% 10% 100%
Rust

rustc 1.6.0 (c30b771ad 2016-01-19)

C gcc

gcc (Ubuntu 5.2.1-22ubuntu2) 5.2.1 20151010