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
 binary-trees±±±
 regex-dna±±±
 n-body± 
 pidigits †± 
 mandelbrot± 
 k-nucleotide±1/3±
 fannkuch-redux ±
 spectral-norm ±
 reverse-complement1/2
 fasta-redux ±
 fasta † ±
 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
 binary-trees 
Clojure32.8810.16531,228750  76% 90% 84% 76%
Java18.8013.20476,640584  38% 37% 32% 37%
 regex-dna 
Clojure28.088.84797,168707  72% 72% 88% 86%
Java26.349.02714,924929  64% 75% 86% 67%
 n-body 
Clojure29.4228.0349,3922162  4% 2% 97% 3%
Java24.4724.4519,5081424  1% 1% 100% 0%
 pidigits 
Clojure6.625.2466,1441944  8% 11% 35% 75% †
Java4.154.0423,488938  2% 2% 0% 100% †
 mandelbrot 
Clojure34.909.66133,6881195  88% 96% 89% 90%
Java27.036.9181,940796  98% 99% 97% 98%
 k-nucleotide 
Clojure39.8515.07375,7842723  69% 82% 79% 36%
Java35.8910.661,200,3201844  82% 83% 92% 82%
 fannkuch-redux 
Clojure144.5937.0253,3361491  97% 98% 99% 97%
Java64.3816.3319,9081282  98% 100% 98% 99%
 spectral-norm 
Clojure42.1611.2549,204918  92% 92% 94% 97%
Java16.564.3020,064950  95% 96% 99% 96%
 reverse-complement 
Clojure6.784.58562,476727  45% 45% 15% 46%
Java2.671.36306,1561661  81% 33% 38% 47%
 fasta-redux 
Clojure9.278.0357,2921428  25% 77% 13% 4%
Java1.921.8719,7921443  2% 2% 2% 99%
 fasta 
Clojure11.089.6954,6961653  6% 7% 96% 7% †
Java5.231.7329,1042457  70% 68% 95% 70% †

† 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_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