The Computer Language
Benchmarks Game

Rust programs versus C gcc

by benchmark task performance

k-nucleotide
source secs mem gz cpu cpu load
Rust 5.30 140,364 1728 16.34 100% 86% 55% 70%
C gcc 6.46 130,076 1500 17.06 51% 37% 89% 88%
pidigits
source secs mem gz cpu cpu load
Rust 1.75 6,280 1306 1.74 2% 1% 1% 100%
C gcc 1.73 1,992 448 1.73 1% 100% 1% 0%
reverse-complement
source secs mem gz cpu cpu load
Rust 0.45 254,232 1324 0.76 25% 26% 28% 98%
C gcc 0.42 145,900 812 0.57 0% 26% 20% 100%
fasta
source secs mem gz cpu cpu load
Rust 1.49 20,324 1887 4.55 75% 76% 75% 82%
C gcc 1.36 2,800 1993 5.26 96% 97% 100% 97%
regex-redux
source secs mem gz cpu cpu load
Rust 3.28 222,916 804 6.46 33% 100% 32% 35%
C gcc 2.86 106,260 1266 4.47 19% 18% 100% 21%
mandelbrot
source secs mem gz cpu cpu load
Rust 1.90 38,724 1160 7.48 98% 98% 99% 98%
C gcc 1.64 29,848 1135 6.51 100% 100% 100% 100%
spectral-norm
source secs mem gz cpu cpu load
Rust 2.36 14,036 1050 9.04 99% 99% 99% 99%
C gcc 1.98 1,776 1139 7.87 99% 99% 100% 99%
fannkuch-redux
source secs mem gz cpu cpu load
Rust 10.80 20,028 1020 43.07 100% 100% 100% 100%
C gcc 9.07 1,576 910 35.43 100% 99% 98% 94%
n-body
source secs mem gz cpu cpu load
Rust 13.08 3,676 1799 13.08 1% 1% 100% 1%
C gcc 9.56 1,000 1490 9.56 1% 100% 1% 1%
binary-trees
source secs mem gz cpu cpu load
Rust 4.94 385,756 764 19.07 96% 96% 96% 100%
C gcc 3.28 156,780 906 10.12 91% 77% 59% 83%
Rust

rustc 1.16.0 (30cf806ef 2017-03-10)

C gcc

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