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 Scala 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 Scala 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
 fasta1/2 ±
 spectral-norm± ±
 n-body± ±
 reverse-complement †±1/4±
 pidigits± 1/3
 fannkuch-redux± ±
 regex-dna±1/2±
 binary-trees±±
 mandelbrot ±
 k-nucleotide±
 Haskell GHC used what fraction? used how many times more? 
Time-used  |-  |---  25% median  75%  ---|  -|
(Elapsed secs)1/21/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 Scala program.

Program Source Code CPU secs Elapsed secs Memory KB Code B ≈ CPU Load
 fasta 
Haskell GHC4.494.022,732979  5% 6% 100% 5%
Scala6.516.3726,9081053  2% 26% 1% 75%
 spectral-norm 
Haskell GHC15.704.041,940984  97% 97% 97% 97%
Scala17.814.6325,420720  100% 95% 95% 95%
 n-body 
Haskell GHC24.3523.172,7281874  2% 3% 100% 2%
Scala26.5226.4525,9041358  0% 1% 100% 0%
 reverse-complement 
Haskell GHC1.551.38126,340999  99% 4% 4% 4% †
Scala2.021.54516,736761  3% 92% 5% 35% †
 pidigits 
Haskell GHC3.982.716,212341  17% 16% 100% 17%
Scala3.742.9944,8361125  10% 9% 99% 10%
 fannkuch-redux 
Haskell GHC63.3916.154,036834  99% 100% 100% 94%
Scala69.8917.7725,6401017  97% 98% 100% 98%
 regex-dna 
Haskell GHC35.699.52250,0081518  93% 91% 96% 96%
Scala28.228.16422,9361704  96% 80% 87% 85%
 binary-trees 
Haskell GHC64.7320.18813,620612  74% 74% 99% 74%
Scala24.4414.78397,928494  52% 24% 24% 68%
 mandelbrot 
Haskell GHC45.8111.4937,116782  100% 100% 100% 100%
Scala28.567.42285,580786  96% 96% 98% 96%
 k-nucleotide 
Haskell GHC65.9917.73363,7801693  92% 93% 93% 97%
Scala25.109.23171,4642080  55% 76% 69% 73%
 fasta-redux 
No program
Scala0.230.19?1435  5% 5% 16% 89%

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