The Computer Language
Benchmarks Game

Clojure programs versus Java

by benchmark task performance

fannkuch-redux
source secs mem gz cpu cpu load
Clojure 19.84 72,936 1491 76.27 99% 96% 95% 95%
Java 17.74 30,048 1282 69.90 98% 98% 100% 99%
binary-trees
source secs mem gz cpu cpu load
Clojure 13.81 615,132 750 45.65 85% 83% 88% 76%
Java 11.52 643,924 889 40.54 89% 92% 85% 89%
spectral-norm
source secs mem gz cpu cpu load
Clojure 5.23 63,380 918 18.38 85% 87% 86% 95%
Java 4.29 31,428 950 16.56 97% 96% 98% 97%
n-body
source secs mem gz cpu cpu load
Clojure 26.36 80,540 2162 27.52 2% 2% 97% 4%
Java 21.50 27,240 1489 21.52 1% 1% 100% 0%
mandelbrot
source secs mem gz cpu cpu load
Clojure 8.94 156,448 1195 31.73 88% 88% 89% 91%
Java 5.89 89,504 796 23.08 98% 98% 98% 99%
pidigits
source secs mem gz cpu cpu load
Clojure 5.43 409,644 1794 8.02 16% 37% 26% 71%
Java 3.06 31,088 938 3.16 0% 3% 9% 92%
regex-redux
source secs mem gz cpu cpu load
Clojure 25.10 933,524 719 45.68 55% 58% 24% 47%
Java 12.16 927,212 929 37.28 73% 81% 75% 78%
reverse-complement
source secs mem gz cpu cpu load
Clojure 2.65 579,024 727 4.05 55% 20% 58% 23%
Java 1.11 345,308 1661 2.44 33% 58% 54% 80%
fasta
source secs mem gz cpu cpu load
Clojure 6.49 71,088 1653 7.80 13% 88% 9% 13%
Java 2.14 36,192 2457 5.68 71% 58% 62% 77%
k-nucleotide
source secs mem gz cpu cpu load
Clojure 30.42 1,012,240 3030 98.48 84% 88% 76% 77%
Java 8.02 467,004 1802 25.57 76% 98% 73% 74%
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) 64-Bit Server VM (build 25.45-b02, mixed mode)

Java

java version "1.8.0_121"
Java(TM) SE Runtime Environment (build 1.8.0_121-b13)
Java HotSpot(TM) 64-Bit Server VM (build 25.121-b13, mixed mode)