The Computer Language
Benchmarks Game

Rust programs versus C gcc

by benchmark task performance

reverse-complement
source secs mem gz cpu cpu load
Rust 0.33 270,356 1324 0.61 30% 100% 35% 33%
C gcc 0.42 143,948 812 0.58 15% 26% 98% 2%
k-nucleotide
source secs mem gz cpu cpu load
Rust 5.27 158,224 1728 16.66 99% 58% 91% 71%
C gcc 5.38 129,772 1499 16.37 61% 82% 89% 74%
pidigits
source secs mem gz cpu cpu load
Rust 1.74 7,820 1420 1.74 1% 0% 1% 100%
C gcc 1.73 2,116 448 1.73 1% 99% 1% 0%
fasta
source secs mem gz cpu cpu load
Rust 1.48 18,524 1887 4.56 82% 76% 75% 76%
C gcc 1.33 2,856 2249 5.28 100% 99% 100% 99%
mandelbrot
source secs mem gz cpu cpu load
Rust 1.89 52,740 1160 7.47 100% 99% 99% 99%
C gcc 1.65 32,684 1135 6.53 99% 99% 100% 99%
fannkuch-redux
source secs mem gz cpu cpu load
Rust 10.74 20,056 1020 42.08 100% 99% 94% 100%
C gcc 8.97 1,660 910 35.00 98% 94% 99% 100%
spectral-norm
source secs mem gz cpu cpu load
Rust 2.50 13,956 1050 9.33 95% 93% 90% 97%
C gcc 1.99 1,824 1139 7.88 99% 99% 99% 100%
n-body
source secs mem gz cpu cpu load
Rust 13.16 5,768 1799 13.16 100% 1% 1% 0%
C gcc 9.96 1,016 1490 9.95 1% 1% 1% 100%
binary-trees
source secs mem gz cpu cpu load
Rust 4.33 194,824 717 15.92 100% 91% 91% 92%
C gcc 2.38 131,728 836 7.70 98% 87% 73% 68%
regex-redux
source secs mem gz cpu cpu load
Rust 2.70 173,336 804 4.24 20% 33% 88% 20%
C gcc 1.45 155,768 1230 4.03 61% 64% 56% 100%
Rust

rustc 1.17.0 (56124baa9 2017-04-24)

C gcc

gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406