/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 Ruby 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 Ruby 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
 mandelbrot1/59 
 n-body1/36 
 fannkuch-redux1/21 
 fasta1/11 
 spectral-norm1/11 
 fasta-redux1/9 
 binary-trees1/7±
 k-nucleotide1/4±
 reverse-complement±
 regex-dna
 pidigits 
 Clojure used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/591/591/141/9±

± 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 Ruby program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 mandelbrot 
Clojure65.0265.05111,3041069  0% 0% 1% 100%
Ruby3,857.693,859.075,288307  0% 1% 1% 100%
 n-body 
Clojure39.4139.4365,0162162  0% 0% 1% 100%
Ruby1,433.221,433.665,2881137  0% 0% 0% 100%
 fannkuch-redux 
Clojure153.85153.9069,0881491  1% 1% 0% 100%
Ruby3,192.973,194.075,284384  0% 1% 1% 100%
 fasta 
Clojure19.9219.9470,3801653  0% 0% 1% 100%
Ruby218.22220.085,380987  1% 1% 1% 100%
 spectral-norm 
Clojure52.2252.2566,180808  1% 1% 0% 100%
Ruby567.84568.016,624326  1% 1% 1% 100%
 fasta-redux 
Clojure20.2620.2773,3761399  0% 1% 1% 100%
Ruby176.52179.33191,692772  1% 1% 0% 100%
 binary-trees 
Clojure30.2430.28547,012657  1% 1% 0% 100%
Ruby222.74222.85557,644413  0% 1% 1% 100%
 k-nucleotide 
Clojure53.1653.21460,8522723  0% 1% 1% 100%
Ruby189.00192.22499,732449  0% 1% 0% 100%
 reverse-complement 
Clojure15.1015.12494,8281044  0% 1% 0% 100%
Ruby10.6310.64127,856255  0% 1% 0% 100%
 regex-dna 
Clojure43.7243.75612,192707  1% 1% 0% 100%
Ruby28.1428.15162,792442  0% 1% 1% 100%
 pidigits 
Clojure20.8920.91408,2401794  1% 1% 0% 100%
Ruby11.0811.1172,408240  0% 0% 1% 100%

 4 : Are there other Clojure programs for these benchmarks?

Remember - those are just the fastest Clojure and Ruby 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 Ruby 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