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
 n-body± 
 k-nucleotide±1/3±
 mandelbrot± 
 binary-trees±±±
 pidigits 
 fannkuch-redux ±
 regex-dna±1/2
 fasta ±
 spectral-norm ±
 reverse-complement±±
 fasta-redux ±
 Clojure used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)±±±

± 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
 n-body 
Clojure29.1629.1748,5122162  0% 1% 1% 100%
Java24.5024.5219,6361424  1% 0% 1% 100%
 k-nucleotide 
Clojure40.1940.22389,9322723  1% 1% 0% 100%
Java31.1831.211,189,8121844  1% 1% 0% 100%
 mandelbrot 
Clojure34.9634.99128,2641195  0% 1% 1% 100%
Java26.9626.9859,240796  1% 0% 0% 100%
 binary-trees 
Clojure21.7521.78523,112657  0% 1% 1% 100%
Java16.4116.44521,176584  0% 1% 1% 100%
 pidigits 
Clojure6.526.5366,3841944  1% 1% 2% 100%
Java4.144.1421,844938  1% 0% 1% 100%
 fannkuch-redux 
Clojure144.05144.1051,4761491  0% 1% 1% 100%
Java67.4867.5021,4481282  1% 1% 0% 100%
 regex-dna 
Clojure48.2548.31534,836710  0% 1% 1% 100%
Java22.1222.13564,9521377  2% 1% 1% 100%
 fasta 
Clojure10.9610.9754,7841653  1% 1% 1% 100%
Java4.934.9327,6682457  0% 1% 0% 100%
 spectral-norm 
Clojure41.7841.7948,100918  1% 1% 0% 100%
Java16.3116.3120,440950  1% 1% 0% 100%
 reverse-complement 
Clojure5.965.97418,7441044  0% 1% 1% 100%
Java1.691.69519,612745  0% 1% 0% 100%
 fasta-redux 
Clojure9.259.2656,0121428  1% 1% 1% 100%
Java1.931.9321,6681443  3% 1% 1% 100%

 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_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) Server VM (build 25.25-b02, mixed mode)

Clojure 1.6.0

Clojure benchmarks

Home Page: http://clojure.org/

Download: http://clojure.org/downloads

Revised BSD license

  Home   Conclusions   License   Play