The Computer Language
Benchmarks Game

Rust programs versus C gcc

by benchmark task performance

mandelbrot
source secs KB gz cpu cpu load
Rust 4.96 69,216 868 19.34 97% 99% 100% 96%
C gcc 5.92 32,572 694 22.78 95% 95% 95% 100%
regex-dna
source secs KB gz cpu cpu load
Rust 2.34 221,460 669 5.37 79% 64% 45% 45%
C gcc 2.43 339,000 2579 5.68 46% 70% 51% 72%
pidigits
source secs KB gz cpu cpu load
Rust 1.74 7,880 1420 1.74 99% 1% 1% 1%
C gcc 1.73 1,992 448 1.73 1% 100% 1% 0%
fasta
source secs KB gz cpu cpu load
Rust 1.50 18,844 1887 4.57 76% 82% 75% 75%
C gcc 1.36 2,800 1993 5.26 96% 97% 100% 97%
fannkuch-redux
source secs KB gz cpu cpu load
Rust 13.34 20,136 1191 52.14 100% 95% 98% 99%
C gcc 9.07 1,576 910 35.43 100% 99% 98% 94%
reverse-complement
source secs KB gz cpu cpu load
Rust 0.72 265,472 1807 0.98 100% 3% 28% 14%
C gcc 0.42 145,900 812 0.57 0% 26% 20% 100%
spectral-norm
source secs KB gz cpu cpu load
Rust 4.00 14,092 1107 15.49 99% 99% 98% 99%
C gcc 1.98 1,776 1139 7.87 99% 99% 100% 99%
binary-trees
source secs KB gz cpu cpu load
Rust 7.54 218,564 792 27.86 95% 82% 95% 99%
C gcc 3.28 156,780 906 10.12 91% 77% 59% 83%
n-body
source secs KB gz cpu cpu load
Rust 22.92 5,768 1799 22.91 0% 1% 100% 1%
C gcc 9.56 1,000 1490 9.56 1% 100% 1% 1%
k-nucleotide
source secs KB gz cpu cpu load
Rust 19.75 148,956 1324 54.49 51% 88% 49% 89%
C gcc 6.46 130,076 1500 17.06 51% 37% 89% 88%
Rust

rustc 1.13.0 (2c6933acc 2016-11-07)

C gcc

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