The Computer Language
Benchmarks Game

Clojure programs versus Java

by benchmark task performance

regex-dna
secs KB gz cpu cpu load
Clojure 8.77 600,836 707 28.58 96% 79% 77% 75%
Java 8.24 761,724 929 24.70 68% 73% 77% 83%
fannkuch-redux
secs KB gz cpu cpu load
Clojure 19.84 72,936 1491 76.27 99% 96% 95% 95%
Java 17.41 33,032 1282 68.64 98% 98% 99% 99%
n-body
secs KB gz cpu cpu load
Clojure 26.36 80,540 2162 27.52 2% 2% 97% 4%
Java 22.66 30,036 1424 22.68 97% 3% 0% 1%
binary-trees
secs KB gz cpu cpu load
Clojure 13.81 615,132 750 45.65 85% 83% 88% 76%
Java 11.58 649,456 889 40.18 94% 85% 87% 83%
spectral-norm
secs KB gz cpu cpu load
Clojure 5.23 63,380 918 18.38 85% 87% 86% 95%
Java 4.28 32,696 950 16.53 96% 96% 96% 99%
k-nucleotide
secs KB gz cpu cpu load
Clojure 8.89 367,112 2723 22.47 71% 61% 67% 56%
Java 6.60 263,468 2568 20.56 76% 76% 90% 70%
mandelbrot
secs KB gz cpu cpu load
Clojure 8.94 156,448 1195 31.73 88% 88% 89% 91%
Java 6.27 88,992 796 24.24 96% 97% 97% 98%
pidigits
secs KB gz cpu cpu load
Clojure 5.43 409,644 1794 8.02 16% 37% 26% 71%
Java 3.12 33,528 938 3.22 3% 2% 80% 21%
fasta-redux
secs KB gz cpu cpu load
Clojure 4.99 71,624 1428 6.24 34% 74% 8% 12%
Java 2.59 29,940 1443 2.65 1% 76% 1% 25%
reverse-complement
secs KB gz cpu cpu load
Clojure 2.65 579,024 727 4.05 55% 20% 58% 23%
Java 1.27 315,296 1661 2.68 41% 48% 34% 92%
fasta
secs KB gz cpu cpu load
Clojure 6.49 71,088 1653 7.80 13% 88% 9% 13%
Java 2.19 39,368 2457 5.60 58% 72% 66% 61%
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_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)