The Computer Language
Benchmarks Game

Rust programs versus C gcc

by benchmark task performance

regex-dna
source secs KB gz cpu cpu load
Rust 1.93 219,284 699 4.83 79% 51% 51% 73%
C gcc 2.43 339,000 2579 5.68 46% 70% 51% 72%
k-nucleotide
source secs KB gz cpu cpu load
Rust 5.30 156,224 1728 16.50 57% 90% 72% 99%
C gcc 6.46 130,076 1500 17.06 51% 37% 89% 88%
pidigits
source secs KB gz cpu cpu load
Rust 1.74 7,896 1420 1.74 2% 1% 0% 100%
C gcc 1.73 1,992 448 1.73 1% 100% 1% 0%
fasta
source secs KB gz cpu cpu load
Rust 1.49 18,444 1887 4.57 75% 84% 76% 76%
C gcc 1.36 2,800 1993 5.26 96% 97% 100% 97%
mandelbrot
source secs KB gz cpu cpu load
Rust 2.01 28,256 1007 7.97 100% 100% 100% 100%
C gcc 1.64 29,588 1135 6.50 99% 100% 100% 100%
n-body
source secs KB gz cpu cpu load
Rust 13.22 5,756 1799 13.21 0% 1% 0% 100%
C gcc 9.56 1,000 1490 9.56 1% 100% 1% 1%
fannkuch-redux
source secs KB gz cpu cpu load
Rust 13.20 17,880 1191 51.60 100% 95% 99% 98%
C gcc 9.07 1,576 910 35.43 100% 99% 98% 94%
reverse-complement
source secs KB gz cpu cpu load
Rust 0.73 265,324 1807 0.99 17% 28% 74% 26%
C gcc 0.42 145,900 812 0.57 0% 26% 20% 100%
spectral-norm
source secs KB gz cpu cpu load
Rust 3.97 14,124 1107 15.46 99% 99% 99% 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.51 220,396 792 27.26 98% 77% 96% 94%
C gcc 3.28 156,780 906 10.12 91% 77% 59% 83%
Rust

rustc 1.15.0 (10893a9a3 2017-01-19)

C gcc

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