1 : Are the Racket programs faster? At a glance.

Each chart bar shows, for one unidentified benchmark, how much the fastest Racket program used compared to the fastest C++ g++ 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 Racket programs faster? Approximately.

Each table row shows, for one named benchmark, how much the fastest Racket program used compared to the fastest C++ g++ program.

(Memory use is only compared for tasks that require memory to be allocated.)

 Racket used what fraction? used how many times more? 
Benchmark Time Memory Code
 pidigits± 
 spectral-norm 1/2
 mandelbrot ±
 binary-trees±±
 fasta ±
 reverse-complement±1/2
 k-nucleotide±
 n-body ±
 regex-dna±
 fannkuch-redux12× ±
 Racket used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)±±10×12×

± read the measurements and then read the program source code.

 3 : Are the Racket 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 Racket program are shown for comparison against measurements of the fastest C++ g++ program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 pidigits 
Racket2.342.3425,6201122  0% 1% 1% 100%
C++ g++2.292.301,656682  0% 1% 2% 100%
 spectral-norm 
Racket20.6020.6126,176627  0% 1% 0% 100%
C++ g++10.0510.057521044  1% 0% 1% 100%
 mandelbrot 
Racket71.5971.6161,184796  0% 0% 0% 100%
C++ g++23.7523.7632,3881017  1% 1% 0% 100%
 binary-trees 
Racket39.8439.91397,088640  0% 0% 1% 100%
C++ g++13.1013.11296,288892  1% 1% 1% 100%
 fasta 
Racket17.2217.2324,5841276  0% 1% 0% 100%
C++ g++4.234.231,0721286  1% 0% 1% 100%
 reverse-complement 
Racket4.364.36171,3161026  0% 0% 1% 100%
C++ g++0.870.87245,7242275  3% 1% 0% 100%
 k-nucleotide 
Racket96.6796.91387,480881  0% 1% 1% 100%
C++ g++18.1018.13152,5521252  0% 1% 1% 100%
 n-body 
Racket53.9153.9427,5281689  0% 1% 1% 100%
C++ g++9.359.354361544  1% 1% 1% 100%
 regex-dna 
Racket40.1040.13713,892527  0% 0% 1% 100%
C++ g++5.225.22202,556695  1% 1% 0% 100%
 fannkuch-redux 
Racket272.01272.0820,224903  0% 0% 1% 100%
C++ g++22.6622.673601150  1% 1% 0% 100%
 fasta-redux 
No program
C++ g++0.030.03?1474  0% 0% 0% 75%

 4 : Are there other Racket programs for these benchmarks?

Remember - those are just the fastest Racket and C++ g++ programs measured on this OS/machine. Check if there are other implementations of these benchmark programs for Racket.

Maybe one of those other Racket programs is fastest on a different OS/machine.

 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest Racket and C++ g++ 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.

 Racket : statically-scoped properly tail-recursive dialect of lisp 

Welcome to Racket v6.0.

Home Page: Racket

Download: Racket v6.0 (February 2014)

Revised BSD license

  Home   Conclusions   License   Play