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
 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 : 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
 mandelbrot 
Clojure35.219.79155,7041195  95% 88% 89% 89%
Haskell GHC55.7313.9734,212782  100% 100% 100% 100%
 k-nucleotide 
Clojure40.4815.35393,5282852  59% 65% 71% 70%
Haskell GHC76.8120.49268,8201965  97% 93% 94% 92%
 binary-trees 
Clojure33.9210.45534,788750  84% 90% 78% 73%
Haskell GHC40.4113.66405,572612  67% 99% 67% 66%
 regex-dna 
Clojure28.218.82642,768707  77% 98% 73% 73%
Haskell GHC39.4410.41208,9641518  97% 97% 93% 93%
 n-body 
Clojure34.6033.2654,2762324  98% 2% 2% 3%
Haskell GHC27.1026.373,6441874  100% 2% 1% 2%
 pidigits 
Clojure6.875.3075,1921944  18% 39% 58% 17%
Haskell GHC4.913.4812,272341  100% 14% 15% 14%
 fannkuch-redux 
Clojure135.7735.2255,0081491  98% 99% 98% 99%
Haskell GHC54.3613.893,4241153  98% 98% 100% 95%
 spectral-norm 
Clojure41.6411.3553,388808  93% 93% 91% 90%
Haskell GHC16.084.151,392984  95% 97% 99% 97%
 reverse-complement 
Clojure6.584.54517,384727  29% 12% 58% 49% †
Haskell GHC1.561.46134,216999  2% 100% 3% 2% †
 fasta 
Clojure11.159.7261,1281692  7% 98% 5% 7% †
Haskell GHC3.342.1115,5321550  44% 21% 44% 50% †
 fasta-redux 
Clojure2.881.4654,4681605  67% 45% 38% 49%
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) Server VM (build 25.45-b02, mixed mode)

Clojure 1.7.0

Clojure benchmarks

Home Page: http://clojure.org/

Download: http://clojure.org/downloads

Revised BSD license

  Home   Conclusions   License   Play