The Computer Language
Benchmarks Game

Rust programs versus C gcc

by benchmark task performance

k-nucleotide
source secs KB gz cpu cpu load
Rust 8.60 155,776 2078 25.66 61% 70% 83% 91%
C gcc 12.35 131,904 1535 36.58 37% 71% 95% 94%
fasta
source secs KB gz cpu cpu load
Rust 1.43 23,504 1887 4.24 74% 73% 72% 82%
C gcc 1.81 2,352 1914 5.29 89% 53% 54% 100%
regex-dna
source secs KB gz cpu cpu load
Rust 2.17 201,148 669 3.09 16% 14% 16% 100%
C gcc 2.67 290,792 2579 6.34 96% 76% 84% 67%
mandelbrot
source secs KB gz cpu cpu load
Rust 5.23 65,568 868 20.51 99% 97% 99% 98%
C gcc 5.61 28,988 799 22.40 100% 100% 100% 100%
pidigits
source secs KB gz cpu cpu load
Rust 2.49 6,824 1420 2.49 0% 100% 0% 1%
C gcc 2.50 2,140 448 2.49 100% 0% 1% 0%
fannkuch-redux
source secs KB gz cpu cpu load
Rust 11.24 12,376 1191 44.06 100% 99% 95% 98%
C gcc 10.06 1,388 910 39.49 99% 99% 95% 100%
binary-trees
source secs KB gz cpu cpu load
Rust 3.74 79,216 791 14.15 94% 96% 97% 95%
C gcc 2.97 105,024 906 9.68 93% 77% 87% 72%
reverse-complement
source secs KB gz cpu cpu load
Rust 0.76 260,256 1985 0.98 27% 75% 19% 13%
C gcc 0.60 251,368 741 0.86 95% 84% 44% 15%
n-body
source secs KB gz cpu cpu load
Rust 15.19 6,316 1799 15.18 1% 0% 100% 1%
C gcc 10.39 736 1490 10.38 0% 100% 1% 1%
fasta-redux
source secs KB gz cpu cpu load
Rust 2.62 6,308 1764 2.62 1% 1% 1% 100%
C gcc 1.59 624 1402 1.59 100% 1% 1% 0%
spectral-norm
source secs KB gz cpu cpu load
Rust 3.98 6,380 1265 15.74 99% 99% 99% 99%
C gcc 1.98 1,704 569 7.86 99% 100% 99% 99%
Rust

rustc 1.3.0 (9a92aaf19 2015-09-15)

C gcc

gcc version 4.9.2 (Ubuntu 4.9.2-10ubuntu13)