The Computer Language
Benchmarks Game

Rust programs versus C gcc

by benchmark task performance

pidigits
source secs KB gz cpu cpu load
Rust 2.52 7,880 1420 2.51 1% 1% 0% 100%
C gcc 2.50 1,992 448 2.50 2% 1% 1% 100%
regex-dna
source secs KB gz cpu cpu load
Rust 5.86 217,244 669 5.83 0% 1% 1% 100%
C gcc 5.53 297,880 2579 5.50 2% 1% 1% 100%
mandelbrot
source secs KB gz cpu cpu load
Rust 26.14 64,980 868 26.11 0% 1% 1% 100%
C gcc 22.37 31,904 694 22.36 1% 1% 1% 100%
reverse-complement
source secs KB gz cpu cpu load
Rust 0.88 267,168 1807 0.88 1% 0% 0% 100%
C gcc 0.62 125,340 812 0.62 3% 0% 0% 100%
fasta
source secs KB gz cpu cpu load
Rust 5.35 5,908 1211 5.34 1% 1% 1% 100%
C gcc 2.79 640 1261 2.79 1% 1% 0% 100%
fannkuch-redux
source secs KB gz cpu cpu load
Rust 48.31 15,956 1191 48.29 1% 1% 2% 100%
C gcc 24.19 636 1183 24.18 1% 1% 0% 100%
spectral-norm
source secs KB gz cpu cpu load
Rust 15.72 16,028 1107 15.51 1% 1% 1% 100%
C gcc 7.85 1,628 569 7.85 1% 1% 1% 100%
n-body
source secs KB gz cpu cpu load
Rust 23.50 5,740 1799 23.49 1% 1% 1% 100%
C gcc 10.01 740 1490 10.00 1% 1% 0% 100%
k-nucleotide
source secs KB gz cpu cpu load
Rust 58.84 166,384 1324 58.78 0% 1% 1% 100%
C gcc 23.93 126,832 1500 23.91 0% 1% 1% 100%
binary-trees
source secs KB gz cpu cpu load
Rust 25.58 122,236 792 25.54 1% 0% 0% 100%
C gcc 9.58 100,796 906 9.57 1% 1% 1% 100%
Rust

rustc 1.13.0 (2c6933acc 2016-11-07)

C gcc

gcc (Ubuntu 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609