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

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 : Approximately - Are the Clojure programs faster?

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
 regex-dna±±±
 pidigits †± 
 mandelbrot± 
 k-nucleotide±1/3±
 fannkuch-redux ±
 spectral-norm ±
 binary-trees±±
 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 : Measurements - Are the Clojure programs faster?

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
 regex-dna 
Clojure28.088.84797,168707  72% 72% 88% 86%
Java25.798.80729,244929  77% 80% 72% 66%
 pidigits 
Clojure6.625.2466,1441944  8% 11% 35% 75% †
Java4.174.0726,324938  3% 3% 4% 96% †
 mandelbrot 
Clojure34.909.66133,6881195  88% 96% 89% 90%
Java27.797.1287,832796  97% 99% 97% 97%
 k-nucleotide 
Clojure39.8515.07375,7842723  69% 82% 79% 36%
Java35.2710.611,199,1841844  79% 78% 90% 88%
 fannkuch-redux 
Clojure144.5937.0253,3361491  97% 98% 99% 97%
Java67.5617.1325,8041282  100% 98% 99% 98%
 spectral-norm 
Clojure42.1611.2549,204918  92% 92% 94% 97%
Java16.534.3026,476950  99% 96% 95% 96%
 binary-trees 
Clojure32.8810.16531,228750  76% 90% 84% 76%
Java10.543.24443,816919  77% 90% 87% 77%
 reverse-complement 
Clojure6.784.58562,476727  45% 45% 15% 46%
Java2.911.44308,0601661  47% 31% 85% 43%
 fasta-redux 
Clojure9.278.0357,2921428  25% 77% 13% 4%
Java1.991.9324,5881443  98% 2% 4% 3%
 fasta 
Clojure11.089.6954,6961653  6% 7% 96% 7% †
Java5.901.8231,6002457  80% 83% 80% 82% †
 n-body 
Clojure3.031.6449,4282162  38% 41% 25% 83%
JavaFailed

† 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