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.06 137,864 1748 15.66 54% 97% 71% 89%
C gcc 6.67 130,160 1506 19.33 76% 50% 92% 75%
reverse-complement
source secs mem gz cpu cpu load
Rust 0.37 250,784 1376 0.66 29% 29% 100% 28%
C gcc 0.48 200,492 820 0.66 4% 19% 25% 98%
pidigits
source secs mem gz cpu cpu load
Rust 1.74 4,612 1366 1.74 2% 0% 0% 99%
C gcc 1.74 2,716 452 1.74 100% 1% 1% 2%
fasta
source secs mem gz cpu cpu load
Rust 1.47 2,988 1906 4.55 83% 76% 76% 76%
C gcc 1.32 2,912 2268 5.25 100% 99% 100% 99%
spectral-norm
source secs mem gz cpu cpu load
Rust 2.27 2,624 817 9.00 100% 99% 100% 100%
C gcc 2.00 1,300 569 7.89 99% 99% 100% 99%
mandelbrot
source secs mem gz cpu cpu load
Rust 1.97 13,340 1007 7.86 99% 99% 100% 100%
C gcc 1.64 29,424 1135 6.53 99% 100% 100% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Rust 10.59 1,776 1020 41.71 100% 99% 100% 95%
C gcc 8.66 980 910 34.22 100% 97% 100% 100%
n-body
source secs mem gz cpu cpu load
Rust 13.57 1,768 1480 13.57 100% 0% 0% 1%
C gcc 9.12 1,176 1490 9.12 1% 100% 2% 2%
binary-trees
source secs mem gz cpu cpu load
Rust 4.02 167,776 721 14.63 89% 99% 91% 89%
C gcc 2.44 133,956 836 7.57 80% 65% 68% 100%
regex-redux
source secs mem gz cpu cpu load
Rust 3.05 188,644 804 4.48 31% 17% 85% 16%
C gcc 1.48 152,352 1230 4.05 59% 99% 57% 61%
Rust

rustc 1.23.0 (766bd11c8 2018-01-01)

C gcc

gcc (Ubuntu 7.2.0-8ubuntu3) 7.2.0