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

± 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 
Clojure27.2026.1650,6882162  97% 2% 2% 4%
Java 722.5122.5017,2561424  0% 0% 100% 0%
 spectral-norm 
Clojure18.755.5158,160808  85% 89% 86% 81%
Java 717.614.5117,540950  97% 97% 99% 98%
 binary-trees 
Clojure25.9518.33531,756705  71% 15% 15% 43%
Java 722.319.24523,7841007  37% 65% 58% 83%
 fasta 
Clojure11.9110.5963,3121839  6% 68% 33% 6%
Java 75.215.1418,2841507  0% 1% 1% 100%
 mandelbrot 
Clojure54.3114.6895,5561069  96% 91% 92% 92%
Java 727.827.0769,460796  99% 98% 99% 98%
 k-nucleotide 
Clojure111.6234.801,006,6403030  84% 74% 84% 80%
Java 746.3913.25450,9721630  86% 84% 96% 85%
 reverse-complement 
Clojure4.633.49336,6641044  28% 80% 9% 17%
Java 72.791.31298,4041661  61% 77% 40% 39%
 regex-dna 
Clojure49.7325.08554,628710  44% 32% 40% 82%
Java 724.828.55709,672929  65% 82% 65% 79%
 fasta-redux 
Clojure10.899.2754,8841503  6% 97% 8% 7%
Java 72.562.5217,3081443  0% 1% 1% 100%
 fannkuch-redux 
Clojure156.2048.9655,2161088  80% 79% 77% 79%
Java 751.9013.1517,3481282  99% 99% 98% 98%
 pidigits 
Clojure25.9321.1986,184571  40% 10% 29% 42%
Java 710.204.2960,5201808  68% 62% 65% 45%

 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) 64-Bit Server VM (build 23.6-b04, mixed mode)

Clojure 1.5.0

Clojure benchmarks

Home Page: http://clojure.org/

Download: http://clojure.org/downloads

Revised BSD license

  Home   Conclusions   License   Play