/mobile Handheld Friendly website

vs

 1 : Are the Clojure programs faster? At a glance.

Each chart bar shows, for one unidentified benchmark, how much the fastest Clojure program used compared to the fastest Java program.

(Memory use is only compared for tasks that require memory to be allocated.)


These are not the only compilers and interpreters. These are not the only programs that could be written. These are not the only tasks that could be solved. These are just 10 tiny examples.

 2 : Are the Clojure programs faster? Approximately.

Each table row shows, for one named benchmark, how much the fastest Clojure program used compared to the fastest Java program.

(Memory use is only compared for tasks that require memory to be allocated.)

 Clojure used what fraction? used how many times more? 
Benchmark Time Memory Code
 k-nucleotide±±
 binary-trees±±
 fannkuch-redux± ±
 n-body †± 
 regex-dna±±±
 fasta † ±
 spectral-norm ±
 mandelbrot ±
 pidigits † 
 fasta-redux † ±
 reverse-complement1/2
 Clojure used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)±±±

† possible mismatch - one-core program compared to multi-core program.

± read the measurements and then read the program source code.

 3 : Are the Clojure programs faster? Measurements.

These are not the only tasks that could be solved. These are just 10 tiny examples. These are not the only compilers and interpreters. These are not the only programs that could be written.

For each named benchmark, measurements of the fastest Clojure program are shown for comparison against measurements of the fastest Java program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 k-nucleotide 
Clojure35.9513.12506,0802723  58% 79% 56% 82%
Java44.8512.81504,3121602  93% 86% 87% 84%
 binary-trees 
Clojure56.6116.97618,640750  74% 88% 82% 91%
Java24.8914.48390,708584  34% 73% 38% 30%
 fannkuch-redux 
Clojure88.2123.3699,8761491  92% 96% 98% 92%
Java70.0617.7319,7201282  99% 99% 98% 99%
 n-body 
Clojure42.5830.87102,8482162  16% 94% 13% 16% †
Java22.9022.8719,5721424  99% 1% 1% 1% †
 regex-dna 
Clojure39.2012.85636,492707  73% 85% 73% 76%
Java24.528.59707,744929  80% 64% 79% 64%
 fasta 
Clojure18.179.63109,3881653  90% 35% 30% 35% †
Java5.375.2820,6681507  1% 70% 1% 31% †
 spectral-norm 
Clojure32.689.7196,464762  85% 86% 83% 84%
Java17.804.5921,132950  97% 96% 99% 96%
 mandelbrot 
Clojure64.1318.04138,5161069  92% 81% 93% 90%
Java27.847.1162,344796  98% 97% 98% 100%
 pidigits 
Clojure22.118.57319,9881794  71% 89% 65% 38% †
Java3.173.0323,504938  19% 80% 5% 3% †
 fasta-redux 
Clojure17.298.74116,5721399  71% 49% 41% 38% †
Java2.632.5819,9601443  77% 1% 24% 2% †
 reverse-complement 
Clojure14.156.13488,8281044  50% 47% 81% 56%
Java2.971.47300,7121661  47% 37% 78% 43%

† possible mismatch - one-core program compared to multi-core program.

 4 : Are there other Clojure programs for these benchmarks?

Remember - those are just the fastest Clojure and Java programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for Clojure.

Maybe one of those other Clojure programs is fastest on a different OS/machine.

 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest Clojure and Java programs measured on this OS/machine. Check if there are faster implementations of these benchmark programs for other programming languages.

Maybe one of those other programs is fastest on a different OS/machine.

 Clojure :  

java version "1.8.0"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) 64-Bit Server VM (build 25.0-b70, mixed mode)

Clojure 1.6

Clojure benchmarks

Home Page: http://clojure.org/

Download: http://clojure.org/downloads

Revised BSD license

  Home   Conclusions   License   Play