The Computer Language
Benchmarks Game

Clojure programs versus Java

by benchmark task performance

k-nucleotide
secs KB gz cpu cpu load
Clojure 8.81 360,460 2852 22.51 82% 69% 38% 69%
Java 11.29 1,118,288 1844 38.66 83% 97% 82% 82%
regex-dna
secs KB gz cpu cpu load
Clojure 8.84 607,884 707 29.34 94% 81% 80% 78%
Java 8.24 761,724 929 24.70 68% 73% 77% 83%
fannkuch-redux
secs KB gz cpu cpu load
Clojure 20.05 74,476 1491 76.74 96% 99% 94% 94%
Java 17.41 33,032 1282 68.64 98% 98% 99% 99%
n-body
secs KB gz cpu cpu load
Clojure 26.42 66,856 2324 27.64 3% 84% 17% 2%
Java 22.66 30,036 1424 22.68 97% 3% 0% 1%
spectral-norm
secs KB gz cpu cpu load
Clojure 5.37 72,172 918 18.56 93% 86% 86% 82%
Java 4.28 32,696 950 16.53 96% 96% 96% 99%
pidigits
secs KB gz cpu cpu load
Clojure 4.27 92,700 1944 5.80 8% 11% 19% 100%
Java 3.12 33,528 938 3.22 3% 2% 80% 21%
mandelbrot
secs KB gz cpu cpu load
Clojure 9.02 152,976 1195 32.40 89% 86% 97% 88%
Java 6.27 88,992 796 24.24 96% 97% 97% 98%
fasta-redux
secs KB gz cpu cpu load
Clojure 5.11 79,592 1605 6.51 82% 26% 9% 12%
Java 2.59 29,940 1443 2.65 1% 76% 1% 25%
reverse-complement
secs KB gz cpu cpu load
Clojure 2.77 585,660 727 4.36 10% 17% 43% 91%
Java 1.27 315,296 1661 2.68 41% 48% 34% 92%
binary-trees
secs KB gz cpu cpu load
Clojure 14.07 607,276 750 46.55 83% 90% 80% 80%
Java 6.20 524,828 926 20.90 87% 91% 82% 80%
fasta
secs KB gz cpu cpu load
Clojure 6.64 76,292 1692 7.84 89% 8% 16% 7%
Java 2.19 39,368 2457 5.60 58% 72% 66% 61%
Clojure

Clojure 1.7.0

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

Java

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