/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 Python 3 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 Python 3 program.

 Clojure used what fraction? used how many times more? 
Benchmark Time Memory Code
 spectral-norm1/37±
 n-body1/36
 mandelbrot1/301/2±
 fasta1/2110×
 fannkuch-redux1/18±
 binary-trees1/81/2±
 k-nucleotide1/4
 reverse-complement †1/21/2
 regex-dna±
 pidigits †12×
 Clojure used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/371/371/301/111/2

† 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 Python 3 program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 spectral-norm 
Clojure18.755.5158,160808  85% 89% 86% 81%
Python 3804.62202.5439,668437  99% 99% 100% 99%
 n-body 
Clojure27.2026.1650,6882162  97% 2% 2% 4%
Python 3934.69935.016,2921181  8% 74% 18% 0%
 mandelbrot 
Clojure54.3114.6895,5561069  96% 91% 92% 92%
Python 31,779.60446.24180,408777  100% 100% 100% 100%
 fasta 
Clojure11.9110.5963,3121839  6% 68% 33% 6%
Python 3219.23222.966,208788  31% 26% 3% 41%
 fannkuch-redux 
Clojure156.2048.9655,2161088  80% 79% 77% 79%
Python 33,556.66900.6036,288797  99% 100% 97% 99%
 binary-trees 
Clojure25.9518.33531,756705  71% 15% 15% 43%
Python 3539.48142.511,209,460626  93% 95% 98% 93%
 k-nucleotide 
Clojure111.6234.801,006,6403030  84% 74% 84% 80%
Python 3384.41129.56451,488647  60% 98% 58% 81%
 reverse-complement 
Clojure4.633.49336,6641044  28% 80% 9% 17% †
Python 35.375.38679,776325  0% 0% 100% 0% †
 regex-dna 
Clojure49.7325.08554,628710  44% 32% 40% 82%
Python 326.3412.88255,724478  41% 33% 99% 32%
 pidigits 
Clojure25.9321.1986,184571  40% 10% 29% 42% †
Python 32.402.406,972255  0% 0% 100% 1% †
 fasta-redux 
Clojure2.631.4252,1881503  32% 70% 45% 39%
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 Python 3 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 Python 3 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