The Computer Language
Benchmarks Game

Clojure programs versus Java

by benchmark task performance

n-body
source secs KB gz cpu cpu load
Clojure 26.36 80,540 2162 27.52 2% 2% 97% 4%
Java 22.53 28,212 1430 22.54 100% 7% 1% 1%
binary-trees
source secs KB gz cpu cpu load
Clojure 13.81 615,132 750 45.65 85% 83% 88% 76%
Java 11.51 622,328 889 40.10 86% 86% 92% 87%
spectral-norm
source secs KB gz cpu cpu load
Clojure 5.23 63,380 918 18.38 85% 87% 86% 95%
Java 4.26 32,244 950 16.41 96% 98% 95% 97%
mandelbrot
source secs KB gz cpu cpu load
Clojure 8.94 156,448 1195 31.73 88% 88% 89% 91%
Java 7.14 88,236 796 27.93 97% 98% 98% 99%
fannkuch-redux
source secs KB gz cpu cpu load
Clojure 19.84 72,936 1491 76.27 99% 96% 95% 95%
Java 13.65 31,996 1282 53.64 99% 98% 99% 98%
pidigits
source secs KB gz cpu cpu load
Clojure 5.43 409,644 1794 8.02 16% 37% 26% 71%
Java 3.11 33,364 938 3.20 99% 2% 2% 2%
regex-dna
source secs KB gz cpu cpu load
Clojure 8.77 600,836 707 28.58 96% 79% 77% 75%
Java 4.56 667,820 1085 12.16 60% 66% 56% 87%
fasta-redux
source secs KB gz cpu cpu load
Clojure 4.99 71,624 1428 6.24 34% 74% 8% 12%
Java 2.53 31,648 1443 2.59 3% 98% 1% 3%
reverse-complement
source secs KB gz cpu cpu load
Clojure 2.65 579,024 727 4.05 55% 20% 58% 23%
Java 1.17 345,940 1661 2.42 41% 43% 57% 72%
fasta
source secs KB gz cpu cpu load
Clojure 6.49 71,088 1653 7.80 13% 88% 9% 13%
Java 2.20 37,072 2457 6.37 81% 68% 72% 72%
k-nucleotide
source secs KB gz cpu cpu load
Clojure 30.42 1,012,240 3030 98.48 84% 88% 76% 77%
Java 8.10 469,624 1802 25.75 97% 77% 76% 71%
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_92"
Java(TM) SE Runtime Environment (build 1.8.0_92-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.92-b14, mixed mode)