/mobile Handheld Friendly website

vs

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

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 binary-trees 
Clojure42.9313.11568,716750  81% 81% 84% 84%
Java17.7512.78471,136584  77% 15% 15% 34%
 n-body 
Clojure40.7931.1564,0762162  95% 14% 13% 11% †
Java24.5024.4815,6561424  0% 100% 1% 0% †
 k-nucleotide 
Clojure52.4619.47460,0322723  90% 77% 66% 38%
Java45.3313.06923,0681630  81% 83% 85% 99%
 regex-dna 
Clojure45.0014.50901,500707  64% 87% 83% 77%
Java26.449.20713,236929  80% 66% 77% 65%
 pidigits 
Clojure21.789.42404,8721794  58% 47% 91% 36% †
Java4.154.0418,352938  16% 84% 1% 1% †
 fannkuch-redux 
Clojure157.2040.6774,1961491  97% 97% 96% 97%
Java68.0417.2515,6961282  99% 99% 97% 99%
 fasta 
Clojure20.9312.5375,8441653  90% 30% 21% 28% †
Java5.135.0516,4441507  2% 1% 1% 100% †
 mandelbrot 
Clojure69.5219.36113,5561069  93% 92% 81% 92%
Java27.176.9573,488796  97% 97% 99% 98%
 spectral-norm 
Clojure53.2414.6570,240762  85% 94% 94% 91%
Java16.564.2916,460950  96% 96% 99% 96%
 reverse-complement 
Clojure15.547.63495,2521044  95% 47% 45% 19%
Java3.161.63296,1361661  77% 24% 39% 58%
 fasta-redux 
Clojure19.9711.6275,2321428  26% 29% 47% 71% †
Java2.031.9815,8961443  82% 19% 2% 2% †

† 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 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 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"
Java(TM) SE Runtime Environment (build 1.8.0-b132)
Java HotSpot(TM) Server VM (build 25.0-b70, 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