The Computer Language
Benchmarks Game

Rust programs versus C gcc

by benchmark task performance

mandelbrot
source secs KB gz cpu cpu load
Rust 5.72 67,928 868 22.53 99% 100% 99% 98%
C gcc 5.92 32,572 694 22.78 95% 95% 95% 100%
pidigits
source secs KB gz cpu cpu load
Rust 1.75 8,092 1420 1.74 100% 0% 1% 3%
C gcc 1.73 1,992 448 1.73 1% 100% 1% 0%
regex-dna
source secs KB gz cpu cpu load
Rust 2.53 228,072 669 5.55 76% 38% 64% 44%
C gcc 2.43 339,000 2579 5.68 46% 70% 51% 72%
fasta
source secs KB gz cpu cpu load
Rust 1.58 20,536 1887 4.68 72% 71% 72% 84%
C gcc 1.36 2,800 1993 5.26 96% 97% 100% 97%
fannkuch-redux
source secs KB gz cpu cpu load
Rust 15.77 20,388 1191 62.26 95% 100% 100% 100%
C gcc 9.07 1,576 910 35.43 100% 99% 98% 94%
spectral-norm
source secs KB gz cpu cpu load
Rust 4.01 14,240 1251 15.48 99% 98% 98% 98%
C gcc 1.98 1,776 1139 7.87 99% 99% 100% 99%
reverse-complement
source secs KB gz cpu cpu load
Rust 0.93 267,552 1807 1.19 13% 2% 100% 17%
C gcc 0.42 145,900 812 0.57 0% 26% 20% 100%
binary-trees
source secs KB gz cpu cpu load
Rust 7.49 224,976 792 26.80 94% 72% 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 24.07 6,052 1474 24.06 1% 100% 1% 1%
C gcc 9.56 1,000 1490 9.56 1% 100% 1% 1%
k-nucleotide
source secs KB gz cpu cpu load
Rust 20.45 172,368 1324 55.55 69% 100% 44% 61%
C gcc 6.46 130,076 1500 17.06 51% 37% 89% 88%
Rust

rustc 1.11.0 (9b21dcd6a 2016-08-15)

C gcc

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