vs

 1 : Are the Haskell GHC programs faster? At a glance.

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

Each table row shows, for one named benchmark, how much the fastest Haskell GHC program used compared to the fastest C gcc program.

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

 Haskell GHC used what fraction? used how many times more? 
Benchmark Time Memory Code
 fasta± ±
 fannkuch-redux± ±
 pidigits †± ±
 k-nucleotide±
 spectral-norm 
 mandelbrot ±
 n-body ±
 reverse-complement †1/2±
 regex-dna±1/2
 binary-trees±
 Haskell GHC 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 Haskell GHC 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 Haskell GHC program are shown for comparison against measurements of the fastest C gcc program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 fasta 
Haskell GHC3.943.662,464979  4% 100% 3% 4%
C gcc3.293.292841261  2% 1% 1% 100%
 fannkuch-redux 
Haskell GHC64.4516.433,4521153  100% 100% 99% 94%
C gcc54.7714.243441557  91% 98% 100% 96%
 pidigits 
Haskell GHC4.953.496,152341  14% 15% 100% 13% †
C gcc2.492.49856448  3% 100% 1% 0% †
 k-nucleotide 
Haskell GHC70.5319.10260,1881965  91% 91% 91% 98%
C gcc35.8912.38130,7561535  94% 63% 91% 43%
 spectral-norm 
Haskell GHC15.704.041,420984  97% 97% 97% 98%
C gcc7.901.99644569  100% 100% 100% 100%
 mandelbrot 
Haskell GHC48.0612.0433,272782  100% 100% 100% 100%
C gcc22.615.6728,464799  100% 100% 100% 100%
 n-body 
Haskell GHC25.0024.402,1921874  1% 1% 100% 1%
C gcc9.919.923361490  0% 0% 1% 100%
 reverse-complement 
Haskell GHC1.541.45125,956999  3% 6% 4% 100% †
C gcc0.840.58250,384741  14% 76% 21% 41% †
 regex-dna 
Haskell GHC33.458.76200,3921518  96% 93% 96% 98%
C gcc6.202.59287,9002579  46% 70% 51% 74%
 binary-trees 
Haskell GHC40.3313.56398,172612  66% 67% 100% 66%
C gcc9.742.85103,700906  76% 76% 100% 93%
 fasta-redux 
No program
C gcc0.020.03?1402  0% 0% 0% 100%

† possible mismatch - one-core program compared to multi-core program.

 4 : Are there other Haskell GHC programs for these benchmarks?

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

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

 5 : Are there other faster programs for these benchmarks?

Remember - those are just the fastest Haskell GHC and C gcc 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.

 Haskell GHC : lazy pure functional programming 

The Glorious Glasgow Haskell Compilation System, version 7.8.2

Home Page: http://www.haskell.org/

Download: http://www.haskell.org/ghc/

Revised BSD license

  Home   Conclusions   License   Play