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

† 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 Haskell GHC program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 k-nucleotide 
Clojure22.518.81360,4602852  82% 69% 38% 69%
Haskell GHC61.0916.46276,5481693  92% 97% 92% 92%
 binary-trees 
Clojure45.9513.92628,936750  91% 86% 81% 75%
Haskell GHC66.7220.72830,536612  75% 80% 94% 75%
 mandelbrot 
Clojure32.409.02152,9761195  89% 86% 97% 88%
Haskell GHC45.8111.4941,208782  100% 100% 100% 100%
 regex-dna 
Clojure29.348.84607,884707  94% 81% 80% 78%
Haskell GHC42.1711.06257,1081518  93% 96% 96% 96%
 n-body 
Clojure27.6426.4266,8562324  3% 84% 17% 2%
Haskell GHC24.4023.176,8041874  3% 2% 3% 100%
 fannkuch-redux 
Clojure76.7420.0574,4761491  96% 99% 94% 94%
Haskell GHC68.2317.368,080834  100% 99% 99% 96%
 spectral-norm 
Clojure18.565.3772,172918  93% 86% 86% 82%
Haskell GHC15.704.055,788984  95% 97% 99% 97%
 pidigits 
Clojure5.804.2792,7001944  8% 11% 19% 100%
Haskell GHC3.972.7010,304341  18% 100% 17% 18%
 fasta 
Clojure7.846.6476,2921692  89% 8% 16% 7% †
Haskell GHC7.613.3213,5481567  54% 54% 52% 70% †
 reverse-complement 
Clojure4.362.77585,660727  10% 17% 43% 91% †
Haskell GHC1.521.36129,412999  3% 5% 4% 100% †
 fasta-redux 
Clojure2.581.4061,0961605  89% 42% 36% 21%
No program

† 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 Haskell GHC 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 Haskell GHC 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