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

† 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 Lisp SBCL program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 k-nucleotide 
Clojure22.518.81360,4602852  82% 69% 38% 69% †
Lisp SBCL33.7233.75153,1522272  1% 0% 0% 100% †
 regex-dna 
Clojure29.348.84607,884707  94% 81% 80% 78%
Lisp SBCL43.9220.57643,3481948  41% 91% 42% 42%
 binary-trees 
Clojure45.9513.92628,936750  91% 86% 81% 75% †
Lisp SBCL24.9124.95294,672649  0% 100% 1% 0% †
 fasta-redux 
Clojure6.515.1179,5921605  82% 26% 9% 12% †
Lisp SBCL6.186.187,6682005  1% 1% 0% 100% †
 fasta 
Clojure7.846.6476,2921692  89% 8% 16% 7%
Lisp SBCL7.597.606,8841751  0% 100% 1% 1%
 n-body 
Clojure27.6426.4266,8562324  3% 84% 17% 2%
Lisp SBCL26.9726.986,6321398  2% 0% 1% 100%
 mandelbrot 
Clojure32.409.02152,9761195  89% 86% 97% 88%
Lisp SBCL28.537.9055,6722459  82% 100% 98% 83%
 fannkuch-redux 
Clojure76.7420.0574,4761491  96% 99% 94% 94%
Lisp SBCL64.9416.7332,1481518  99% 100% 98% 92%
 reverse-complement 
Clojure4.362.77585,660727  10% 17% 43% 91% †
Lisp SBCL2.272.28294,624896  1% 100% 1% 0% †
 spectral-norm 
Clojure18.565.3772,172918  93% 86% 86% 82%
Lisp SBCL15.974.1820,972906  96% 95% 96% 96%
 pidigits 
Clojure5.804.2792,7001944  8% 11% 19% 100% †
Lisp SBCL2.362.379,2801073  3% 1% 0% 100% †

† 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 Lisp SBCL 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 Lisp SBCL 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_45"
Java(TM) SE Runtime Environment (build 1.8.0_45-b14)
Java HotSpot(TM) 64-Bit Server VM (build 25.45-b02, mixed mode)

Clojure 1.7

Clojure benchmarks

Home Page: http://clojure.org/

Download: http://clojure.org/downloads

Revised BSD license

  Home   Conclusions   License   Play