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 Scala 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 Scala 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
 n-body± 
 binary-trees±±±
 mandelbrot± 
 pidigits± 
 fasta 
 regex-dna±±
 fannkuch-redux ±
 spectral-norm 
 fasta-redux ±
 reverse-complement±±
 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 Scala program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 n-body 
Clojure29.1629.1748,5122162  0% 1% 1% 100%
Scala23.8423.8525,0761358  1% 1% 0% 100%
 binary-trees 
Clojure21.7521.78523,112657  0% 1% 1% 100%
Scala17.5917.61516,760494  1% 0% 1% 100%
 mandelbrot 
Clojure34.9634.99128,2641195  0% 1% 1% 100%
Scala27.0427.0695,876786  1% 1% 0% 100%
 pidigits 
Clojure6.526.5366,3841944  1% 1% 2% 100%
Scala4.434.4447,1081125  0% 1% 1% 100%
 fasta 
Clojure10.9610.9754,7841653  1% 1% 1% 100%
Scala6.566.5723,7641053  0% 0% 1% 100%
 regex-dna 
Clojure48.2548.31534,836710  0% 1% 1% 100%
Scala26.3226.34572,164668  1% 0% 0% 100%
 fannkuch-redux 
Clojure144.05144.1051,4761491  0% 1% 1% 100%
Scala59.0059.0125,1841017  1% 1% 0% 100%
 spectral-norm 
Clojure41.7841.7948,100918  1% 1% 0% 100%
Scala16.0016.0123,388404  1% 0% 1% 100%
 fasta-redux 
Clojure9.259.2656,0121428  1% 1% 1% 100%
Scala3.483.4922,0121435  1% 1% 1% 100%
 reverse-complement 
Clojure5.965.97418,7441044  0% 1% 1% 100%
Scala1.801.80518,336761  1% 1% 3% 100%
 k-nucleotide 
Clojure3.073.09110,2482723  0% 2% 1% 100%
ScalaFailed

 4 : Are there other Clojure programs for these benchmarks?

Remember - those are just the fastest Clojure and Scala 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 Scala 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_25"
Java(TM) SE Runtime Environment (build 1.8.0_25-b17)
Java HotSpot(TM) Server VM (build 25.25-b02, 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