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

± 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 
Clojure21.4221.44400,0042723  0% 1% 0% 100%
Java34.7834.841,119,0841844  0% 1% 1% 100%
 fannkuch-redux 
Clojure70.2670.2978,5961491  1% 1% 0% 100%
Java69.8769.8841,3361282  0% 0% 0% 100%
 spectral-norm 
Clojure17.9417.9561,864918  0% 1% 1% 100%
Java17.0917.1025,552514  1% 0% 0% 100%
 regex-dna 
Clojure25.3225.34691,820707  1% 1% 0% 100%
Java20.9420.95567,2761377  2% 9% 1% 100%
 n-body 
Clojure27.7127.7262,1602162  0% 1% 0% 100%
Java22.6722.6723,8121424  1% 0% 1% 100%
 mandelbrot 
Clojure31.9631.98146,5401195  1% 6% 0% 100%
Java23.8623.8788,200796  1% 0% 1% 100%
 fasta 
Clojure7.727.7367,4601653  1% 1% 1% 100%
Java5.355.3632,9162457  0% 1% 1% 100%
 binary-trees 
Clojure24.6224.66558,580705  1% 1% 1% 100%
Java16.8416.87515,100584  0% 1% 1% 100%
 pidigits 
Clojure5.265.2782,8441944  0% 1% 0% 100%
Java3.153.1528,972938  1% 0% 2% 100%
 fasta-redux 
Clojure6.076.0771,0201428  1% 2% 0% 100%
Java2.602.6125,7241443  0% 1% 2% 100%
 reverse-complement 
Clojure3.963.97573,124727  2% 1% 1% 100%
Java1.631.63524,612745  0% 2% 1% 99%

 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) 64-Bit Server VM (build 25.25-b02, mixed mode)

Clojure 1.6

Clojure benchmarks

Home Page: http://clojure.org/

Download: http://clojure.org/downloads

Revised BSD license

  Home   Conclusions   License   Play