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.61 995,072 1376 2.71 24% 31% 95% 24%
C gcc 1.76 994,488 1438 3.98 97% 43% 44% 46%
pidigits
source secs mem gz cpu cpu load
Rust 1.74 4,420 1366 1.74 2% 0% 1% 99%
C gcc 1.88 2,720 416 1.87 2% 1% 2% 100%
spectral-norm
source secs mem gz cpu cpu load
Rust 1.98 2,460 1126 7.87 100% 99% 99% 99%
C gcc 1.98 1,168 1139 7.87 100% 99% 100% 99%
mandelbrot
source secs mem gz cpu cpu load
Rust 1.75 33,800 1332 6.86 98% 98% 100% 98%
C gcc 1.64 26,512 1135 6.54 99% 100% 99% 100%
fasta
source secs mem gz cpu cpu load
Rust 1.47 3,032 1906 4.97 83% 84% 83% 90%
C gcc 1.36 2,864 2268 5.41 99% 100% 100% 99%
binary-trees
source secs mem gz cpu cpu load
Rust 4.11 175,320 721 15.08 100% 90% 90% 90%
C gcc 3.73 116,600 836 11.74 76% 71% 98% 72%
k-nucleotide
source secs mem gz cpu cpu load
Rust 5.41 137,908 1749 17.41 77% 89% 57% 100%
C gcc 4.88 130,060 1506 16.06 87% 96% 87% 60%
fannkuch-redux
source secs mem gz cpu cpu load
Rust 10.01 1,864 1020 39.03 100% 92% 99% 100%
C gcc 8.67 852 910 34.14 99% 100% 100% 95%
n-body
source secs mem gz cpu cpu load
Rust 13.27 1,796 1805 13.26 0% 1% 1% 100%
C gcc 9.37 1,088 1490 9.37 100% 0% 1% 0%
regex-redux
source secs mem gz cpu cpu load
Rust 2.44 205,624 765 3.86 11% 91% 0% 59%
C gcc 1.46 152,216 1397 3.40 45% 41% 100% 49%
Rust

rustc 1.31.0 (abe02cefd 2018-12-04)
LLVM version 7.0.0

C gcc

gcc (Ubuntu 8.2.0-7ubuntu1) 8.2.0