The Computer Language
Benchmarks Game

Clojure programs versus Java

by benchmark task performance

mandelbrot
source secs KB gz cpu cpu load
Clojure 34.85 147,476 1195 34.83 1% 75% 26% 100%
Java 27.41 55,556 796 27.40 1% 0% 1% 100%
binary-trees
source secs KB gz cpu cpu load
Clojure 21.25 525,540 657 21.22 2% 1% 1% 100%
Java 16.53 511,692 584 16.51 1% 1% 0% 100%
n-body
source secs KB gz cpu cpu load
Clojure 34.53 51,772 2162 34.51 1% 21% 80% 100%
Java 24.07 23,184 1430 24.06 1% 1% 1% 100%
k-nucleotide
source secs KB gz cpu cpu load
Clojure 83.65 1,001,268 3030 83.59 1% 1% 100% 100%
Java 47.14 516,280 1602 47.10 1% 1% 1% 100%
regex-dna
source secs KB gz cpu cpu load
Clojure 5.68 189,732 707 5.68 2% 100% 1% 100%
Java 3.17 107,656 740 3.09 1% 2% 0% 100%
fannkuch-redux
source secs KB gz cpu cpu load
Clojure 145.68 53,848 1491 145.62 17% 55% 98% 100%
Java 67.56 23,480 1282 67.53 1% 1% 1% 100%
pidigits
source secs KB gz cpu cpu load
Clojure 9.54 397,788 1794 9.53 1% 1% 100% 100%
Java 4.14 25,988 938 4.13 1% 1% 0% 100%
fasta
source secs KB gz cpu cpu load
Clojure 11.40 56,676 1653 11.40 0% 1% 1% 100%
Java 4.77 23,400 1507 4.76 1% 1% 1% 100%
spectral-norm
source secs KB gz cpu cpu load
Clojure 40.26 52,220 808 40.24 1% 100% 2% 100%
Java 16.30 23,872 950 16.29 1% 0% 1% 100%
reverse-complement
source secs KB gz cpu cpu load
Clojure 6.11 422,228 1044 6.10 1% 100% 0% 100%
Java 1.79 521,988 745 1.78 1% 2% 2% 100%
fasta-redux
source secs KB gz cpu cpu load
Clojure 9.16 60,612 1399 9.15 1% 0% 1% 100%
Java 1.89 23,120 1443 1.88 2% 2% 0% 100%
Clojure

Clojure 1.8.0

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

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)