/mobile Handheld Friendly website

÷

 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.


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.

 Clojure used what fraction? used how many times more? 
Benchmark Time Memory Code
 n-body †33×±
 binary-trees±
 mandelbrot±
 k-nucleotide±
 fasta †36×
 spectral-norm57×±
 regex-dna1/2
 reverse-complement †±
 fannkuch-redux21×±
 pidigits14×
 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
 n-body 
Clojure46.8036.8367,0922162  10% 12% 10% 95% †
Haskell GHC24.7724.022,0081874  11% 58% 35% 1% †
 binary-trees 
Clojure32.5219.05553,112657  53% 71% 27% 20%
Haskell GHC36.9912.30365,756612  68% 67% 67% 99%
 mandelbrot 
Clojure67.3718.42106,6241069  95% 94% 90% 88%
Haskell GHC43.9411.0233,928782  100% 100% 100% 100%
 k-nucleotide 
Clojure118.4339.221,015,7801737  82% 66% 74% 82%
Haskell GHC79.2621.34374,3641965  91% 91% 95% 95%
 fasta 
Clojure22.4214.1781,1361839  23% 88% 22% 27% †
Haskell GHC4.283.802,276979  41% 62% 5% 4% †
 spectral-norm 
Clojure54.5215.6670,732808  88% 87% 89% 86%
Haskell GHC15.724.061,248984  97% 97% 97% 97%
 regex-dna 
Clojure65.7934.29998,912710  35% 36% 46% 76%
Haskell GHC33.658.87210,3161518  92% 95% 98% 95%
 reverse-complement 
Clojure14.957.72482,2281044  32% 81% 40% 43% †
Haskell GHC1.901.73125,816999  42% 5% 5% 63% †
 fannkuch-redux 
Clojure277.7981.9870,0841088  85% 85% 85% 85%
Haskell GHC66.8017.023,2641153  100% 99% 100% 94%
 pidigits 
Clojure46.3932.3681,584571  19% 19% 36% 71%
Haskell GHC6.584.175,972341  36% 51% 38% 34%
 fasta-redux 
Clojure12.524.4469,7921503  77% 64% 78% 64%
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.7.0_11"
Java(TM) SE Runtime Environment (build 1.7.0_11-b21)
Java HotSpot(TM) Server VM (build 23.6-b04, mixed mode)

Clojure 1.4.0

Clojure benchmarks

Home Page: http://clojure.org/

Download: http://clojure.org/downloads

Revised BSD license

  Home   Conclusions   License   Play