The Computer Language
Benchmarks Game

Rust programs versus C gcc

by benchmark task performance

pidigits
source secs KB gz cpu cpu load
Rust 2.51 8,048 1420 2.51 0% 1% 1% 100%
C gcc 2.50 1,992 448 2.50 2% 1% 1% 100%
mandelbrot
source secs KB gz cpu cpu load
Rust 25.24 65,824 868 25.20 2% 1% 0% 100%
C gcc 22.37 31,904 694 22.36 1% 1% 1% 100%
regex-dna
source secs KB gz cpu cpu load
Rust 6.71 231,060 669 6.69 1% 0% 1% 100%
C gcc 5.53 297,880 2579 5.50 2% 1% 1% 100%
reverse-complement
source secs KB gz cpu cpu load
Rust 1.07 267,484 1807 1.07 2% 1% 2% 100%
C gcc 0.62 125,340 812 0.62 3% 0% 0% 100%
spectral-norm
source secs KB gz cpu cpu load
Rust 15.72 16,220 1251 15.51 1% 1% 0% 100%
C gcc 7.85 1,628 569 7.85 1% 1% 1% 100%
fannkuch-redux
source secs KB gz cpu cpu load
Rust 48.64 16,168 1191 48.61 1% 0% 1% 100%
C gcc 24.19 636 1183 24.18 1% 1% 0% 100%
fasta
source secs KB gz cpu cpu load
Rust 5.64 5,912 1211 5.63 0% 0% 1% 100%
C gcc 2.79 640 1261 2.79 1% 1% 0% 100%
n-body
source secs KB gz cpu cpu load
Rust 23.18 5,972 1799 23.17 4% 1% 0% 100%
C gcc 10.01 740 1490 10.00 1% 1% 0% 100%
k-nucleotide
source secs KB gz cpu cpu load
Rust 58.81 161,056 1324 58.74 1% 1% 0% 100%
C gcc 23.93 126,832 1500 23.91 0% 1% 1% 100%
binary-trees
source secs KB gz cpu cpu load
Rust 24.34 122,396 792 24.30 1% 1% 0% 100%
C gcc 9.58 100,796 906 9.57 1% 1% 1% 100%
Rust

rustc 1.12.0 (3191fbae9 2016-09-23)

C gcc

gcc (Ubuntu 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609