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

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

Each table row shows, for one named benchmark, how much the fastest Haskell GHC program used compared to the fastest Java 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
 pidigits †± 1/3
 spectral-norm± ±
 fannkuch-redux± 1/2
 reverse-complement †±1/21/2
 regex-dna±1/3
 k-nucleotide±1/4±
 fasta 1/2
 mandelbrot ±
 binary-trees1/2
 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 : Measurements - Are the Haskell GHC programs faster?

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 Java program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 pidigits 
Haskell GHC3.972.7010,304341  18% 100% 17% 18% †
Java3.223.1233,528938  3% 2% 80% 21% †
 spectral-norm 
Haskell GHC15.704.055,788984  95% 97% 99% 97%
Java16.534.2832,696950  96% 96% 96% 99%
 fannkuch-redux 
Haskell GHC68.2317.368,080834  100% 99% 99% 96%
Java68.6417.4133,0321282  98% 98% 99% 99%
 reverse-complement 
Haskell GHC1.521.36129,412999  3% 5% 4% 100% †
Java2.681.27315,2961661  41% 48% 34% 92% †
 regex-dna 
Haskell GHC42.1711.06257,1081518  93% 96% 96% 96%
Java24.708.24761,724929  68% 73% 77% 83%
 k-nucleotide 
Haskell GHC61.0916.46276,5481693  92% 97% 92% 92%
Java38.6611.291,118,2881844  83% 97% 82% 82%
 fasta 
Haskell GHC7.613.3213,5481567  54% 54% 52% 70%
Java5.602.1939,3682457  58% 72% 66% 61%
 mandelbrot 
Haskell GHC45.8111.4941,208782  100% 100% 100% 100%
Java24.246.2788,992796  96% 97% 97% 98%
 binary-trees 
Haskell GHC66.7220.72830,536612  75% 80% 94% 75%
Java11.543.43445,500919  82% 83% 93% 81%
 n-body 
Haskell GHC0.270.255681874  8% 4% 100% 4%
JavaFailed
 fasta-redux 
No program
Java0.220.19?1443  95% 10% 10% 10%

† 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 Java 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 Java 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