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 5.38 129,772 1499 16.37 61% 82% 89% 74%
spectral-norm
source secs mem gz cpu cpu load
Rust 2.01 20,080 817 7.96 100% 100% 100% 100%
C gcc 1.99 1,824 1139 7.88 99% 99% 99% 100%
pidigits
source secs mem gz cpu cpu load
Rust 1.75 6,280 1306 1.74 2% 1% 1% 100%
C gcc 1.73 2,116 448 1.73 1% 99% 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 143,948 812 0.58 15% 26% 98% 2%
fasta
source secs mem gz cpu cpu load
Rust 1.49 20,324 1887 4.55 75% 76% 75% 82%
C gcc 1.33 2,856 2249 5.28 100% 99% 100% 99%
mandelbrot
source secs mem gz cpu cpu load
Rust 1.90 38,724 1160 7.48 98% 98% 99% 98%
C gcc 1.65 32,684 1135 6.53 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 8.97 1,660 910 35.00 98% 94% 99% 100%
n-body
source secs mem gz cpu cpu load
Rust 13.08 3,676 1799 13.08 1% 1% 100% 1%
C gcc 9.96 1,016 1490 9.95 1% 1% 1% 100%
binary-trees
source secs mem gz cpu cpu load
Rust 4.27 184,600 714 15.84 98% 92% 92% 92%
C gcc 2.38 131,728 836 7.70 98% 87% 73% 68%
regex-redux
source secs mem gz cpu cpu load
Rust 3.28 222,916 804 6.46 33% 100% 32% 35%
C gcc 1.45 155,768 1230 4.03 61% 64% 56% 100%
Rust

rustc 1.16.0 (30cf806ef 2017-03-10)

C gcc

gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406