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 Python 3 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 Python 3 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
 spectral-norm1/52 
 n-body1/41 
 fannkuch-redux1/31 ±
 fasta †1/27 
 mandelbrot1/21 ±
 binary-trees1/6±±
 k-nucleotide1/5±±
 reverse-complement †1/21/2±
 regex-dna±±
 pidigits †± ±
 Haskell GHC used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/521/521/311/101/2±±

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

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 spectral-norm 
Haskell GHC15.704.055,788984  95% 97% 99% 97%
Python 3821.48209.7643,728437  98% 98% 98% 98%
 n-body 
Haskell GHC24.4023.176,8041874  3% 2% 3% 100%
Python 3939.20939.505,5641181  1% 0% 0% 100%
 fannkuch-redux 
Haskell GHC68.2317.368,080834  100% 99% 99% 96%
Python 32,154.08546.3840,176944  98% 99% 98% 99%
 fasta 
Haskell GHC7.613.3213,5481567  54% 54% 52% 70% †
Python 390.6190.645,608977  1% 1% 1% 100% †
 mandelbrot 
Haskell GHC45.8111.4941,208782  100% 100% 100% 100%
Python 3954.62239.1040,852686  100% 100% 100% 100%
 binary-trees 
Haskell GHC66.7220.72830,536612  75% 80% 94% 75%
Python 3481.66127.90838,044596  98% 93% 93% 94%
 k-nucleotide 
Haskell GHC61.0916.46276,5481693  92% 97% 92% 92%
Python 3279.6375.48225,4121937  93% 91% 92% 96%
 reverse-complement 
Haskell GHC1.521.36129,412999  3% 5% 4% 100% †
Python 34.302.92262,444800  4% 19% 99% 29% †
 regex-dna 
Haskell GHC42.1711.06257,1081518  93% 96% 96% 96%
Python 322.9810.42269,120478  40% 48% 83% 55%
 pidigits 
Haskell GHC3.972.7010,304341  18% 100% 17% 18% †
Python 32.212.216,784335  1% 100% 1% 0% †
 fasta-redux
   No programs

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

 Haskell GHC : lazy pure functional programming 

The Glorious Glasgow Haskell Compilation System, version 7.8.4

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

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

Revised BSD license

  Home   Conclusions   License   Play