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 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 : 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 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
 mandelbrot± 
 k-nucleotide±±±
 binary-trees±±±
 regex-dna±1/2
 n-body± ±
 pidigits 
 fannkuch-redux ±
 spectral-norm ±
 reverse-complement †±
 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 Haskell GHC program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 mandelbrot 
Clojure34.909.66133,6881195  88% 96% 89% 90%
Haskell GHC55.7313.9734,212782  100% 100% 100% 100%
 k-nucleotide 
Clojure39.8515.07375,7842723  69% 82% 79% 36%
Haskell GHC76.8120.49268,8201965  97% 93% 94% 92%
 binary-trees 
Clojure32.8810.16531,228750  76% 90% 84% 76%
Haskell GHC40.4113.66405,572612  67% 99% 67% 66%
 regex-dna 
Clojure28.088.84797,168707  72% 72% 88% 86%
Haskell GHC39.4410.41208,9641518  97% 97% 93% 93%
 n-body 
Clojure29.4228.0349,3922162  4% 2% 97% 3%
Haskell GHC27.1026.373,6441874  100% 2% 1% 2%
 pidigits 
Clojure6.625.2466,1441944  8% 11% 35% 75%
Haskell GHC4.913.4812,272341  100% 14% 15% 14%
 fannkuch-redux 
Clojure144.5937.0253,3361491  97% 98% 99% 97%
Haskell GHC54.3613.893,4241153  98% 98% 100% 95%
 spectral-norm 
Clojure42.1611.2549,204918  92% 92% 94% 97%
Haskell GHC16.084.151,392984  95% 97% 99% 97%
 reverse-complement 
Clojure6.784.58562,476727  45% 45% 15% 46% †
Haskell GHC1.561.46134,216999  2% 100% 3% 2% †
 fasta 
Clojure11.089.6954,6961653  6% 7% 96% 7% †
Haskell GHC3.342.1115,5321550  44% 21% 44% 50% †
 fasta-redux 
Clojure2.791.4251,6401428  96% 21% 39% 42%
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_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