The Computer Language
Benchmarks Game

Rust programs versus Java

by benchmark task performance

reverse-complement
source secs mem gz cpu cpu load
Rust 0.88 267,168 1807 0.88 1% 0% 0% 100%
Java 1.79 521,988 745 1.78 1% 2% 2% 100%
pidigits
source secs mem gz cpu cpu load
Rust 2.52 7,880 1420 2.51 1% 1% 0% 100%
Java 4.14 25,988 938 4.13 1% 1% 0% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Rust 48.31 15,956 1191 48.29 1% 1% 2% 100%
Java 67.02 23,380 1257 67.00 0% 1% 1% 100%
mandelbrot
source secs mem gz cpu cpu load
Rust 26.14 64,980 868 26.11 0% 1% 1% 100%
Java 27.41 55,556 796 27.40 1% 0% 1% 100%
spectral-norm
source secs mem gz cpu cpu load
Rust 15.72 16,028 1107 15.51 1% 1% 1% 100%
Java 16.30 23,872 950 16.29 1% 0% 1% 100%
n-body
source secs mem gz cpu cpu load
Rust 23.50 5,740 1799 23.49 1% 1% 1% 100%
Java 24.07 23,184 1430 24.06 1% 1% 1% 100%
fasta
source secs mem gz cpu cpu load
Rust 5.35 5,908 1211 5.34 1% 1% 1% 100%
Java 4.77 23,400 1507 4.76 1% 1% 1% 100%
binary-trees
source secs mem gz cpu cpu load
Rust 25.58 122,236 792 25.54 1% 0% 0% 100%
Java 16.53 511,692 584 16.51 1% 1% 0% 100%
k-nucleotide
source secs mem gz cpu cpu load
Rust 58.84 166,384 1324 58.78 0% 1% 1% 100%
Java 36.57 512,948 1802 36.54 1% 0% 0% 100%
Rust

rustc 1.13.0 (2c6933acc 2016-11-07)

Java

java version "1.8.0_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) Server VM (build 25.92-b14, mixed mode)