/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 Java 7 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 Java 7 program.

 Clojure used what fraction? used how many times more? 
Benchmark Time Memory Code
 n-body †
 binary-trees±1/2
 mandelbrot±
 fasta †±
 k-nucleotide±
 regex-dna±±
 spectral-norm±
 fannkuch-redux±
 reverse-complement1/2
 pidigits1/3
 fasta-redux †±
 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 Java 7 program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 n-body 
Clojure46.8036.8367,0922162  10% 12% 10% 95% †
Java 724.4124.3913,9761424  0% 0% 0% 100% †
 binary-trees 
Clojure32.5219.05553,112657  53% 71% 27% 20%
Java 721.359.21525,4201007  50% 70% 48% 65%
 mandelbrot 
Clojure67.3718.42106,6241069  95% 94% 90% 88%
Java 727.146.9067,612796  98% 98% 99% 99%
 fasta 
Clojure22.4214.1781,1361839  23% 88% 22% 27% †
Java 75.074.9914,9761507  2% 0% 100% 1% †
 k-nucleotide 
Clojure118.4339.221,015,7801737  82% 66% 74% 82%
Java 744.8312.93494,2641602  84% 81% 85% 99%
 regex-dna 
Clojure65.7934.29998,912710  35% 36% 46% 76%
Java 727.099.43708,060929  65% 83% 78% 63%
 spectral-norm 
Clojure54.5215.6670,732808  88% 87% 89% 86%
Java 716.394.2114,740950  97% 97% 98% 99%
 fannkuch-redux 
Clojure277.7981.9870,0841088  85% 85% 85% 85%
Java 767.9117.1714,4601282  98% 99% 100% 100%
 reverse-complement 
Clojure14.957.72482,2281044  32% 81% 40% 43%
Java 72.931.52294,7841661  32% 59% 58% 47%
 pidigits 
Clojure46.3932.3681,584571  19% 19% 36% 71%
Java 711.755.1246,4881826  70% 67% 56% 39%
 fasta-redux 
Clojure25.6516.0382,1801503  40% 77% 26% 19% †
Java 71.901.8514,5001443  1% 2% 3% 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 Java 7 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 Java 7 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