The Computer Language
Benchmarks Game

Rust versus C gcc fastest programs

by faster benchmark performance

reverse-complement
source secs mem gz cpu cpu load
Rust 1.62 995,240 1376 2.74 25% 25% 24% 99%
C gcc 1.75 994,468 1438 3.96 48% 44% 95% 44%
pidigits
source secs mem gz cpu cpu load
Rust 1.74 4,592 1366 1.74 2% 1% 100% 2%
C gcc 1.75 2,728 452 1.74 1% 2% 0% 100%
k-nucleotide
source secs mem gz cpu cpu load
Rust 5.32 138,012 1749 16.15 88% 98% 68% 52%
C gcc 5.07 130,008 1506 15.25 88% 84% 58% 73%
mandelbrot
source secs mem gz cpu cpu load
Rust 1.75 34,168 1332 6.86 98% 99% 98% 98%
C gcc 1.64 26,416 1135 6.55 100% 100% 99% 100%
fasta
source secs mem gz cpu cpu load
Rust 1.47 3,008 1961 4.44 81% 76% 74% 74%
C gcc 1.32 2,892 2268 5.22 100% 100% 99% 99%
fannkuch-redux
source secs mem gz cpu cpu load
Rust 10.09 1,876 1020 39.42 100% 93% 100% 99%
C gcc 8.72 980 910 34.43 98% 97% 100% 100%
spectral-norm
source secs mem gz cpu cpu load
Rust 2.30 2,576 817 9.16 100% 100% 100% 100%
C gcc 1.99 1,292 569 7.89 99% 99% 99% 99%
n-body
source secs mem gz cpu cpu load
Rust 13.13 1,728 1805 13.12 1% 0% 100% 0%
C gcc 9.17 1,228 1490 9.17 100% 0% 0% 1%
binary-trees
source secs mem gz cpu cpu load
Rust 4.04 167,448 721 14.74 90% 99% 89% 89%
C gcc 2.54 130,292 836 7.76 78% 67% 64% 98%
regex-redux
source secs mem gz cpu cpu load
Rust 2.75 199,096 804 3.94 35% 20% 18% 88%
C gcc 1.50 152,088 1230 4.06 54% 59% 60% 100%
Rust

rustc 1.27.0 (3eda71b00 2018-06-19)

C gcc

gcc (Ubuntu 7.3.0-16ubuntu3) 7.3.0