The Computer Language
Benchmarks Game

Haskell GHC versus C clang fastest programs

Always look at the source code.

These are only the fastest programs. Do some of them use manually vectorized SIMD? Look at the other programs. They may seem more-like a fair comparison to you.

mandelbrot
source secs mem gz busy cpu load
Haskell GHC 1.51 37,504 1975 5.98 99% 99% 99% 99%
C clang 2.09 31,812 694 8.34 100% 100% 100% 100%
fannkuch-redux
source secs mem gz busy cpu load
Haskell GHC 9.95 3,764 1113 39.18 95% 100% 99% 100%
C clang 9.85 964 1557 37.34 90% 95% 93% 100%
fasta
source secs mem gz busy cpu load
Haskell GHC 0.88 7,628 1882 3.32 94% 96% 93% 93%
C clang 0.78 1,216 1463 0.79 0% 100% 1% 0%
regex-redux
source secs mem gz busy cpu load
Haskell GHC 1.07 345,128 2213 2.47 59% 44% 44% 83%
C clang 0.82 154,084 1397 2.80 82% 83% 79% 96%
n-body
source secs mem gz busy cpu load
Haskell GHC 6.42 4,176 1883 6.47 0% 0% 0% 100%
C clang 3.33 8 1391 3.46 1% 2% 1% 100%
spectral-norm
source secs mem gz busy cpu load
Haskell GHC 1.47 3,964 987 5.71 97% 97% 97% 97%
C clang 0.72 3,056 1139 2.87 100% 100% 100% 100%
pidigits
source secs mem gz busy cpu load
Haskell GHC 1.64 7,792 360 2.06 9% 99% 7% 9%
C clang 0.73 2,820 416 0.72 0% 99% 0% 0%
binary-trees
source secs mem gz busy cpu load
Haskell GHC 5.02 449,868 811 18.05 90% 85% 93% 91%
C clang 1.92 169,416 809 6.15 77% 79% 72% 93%
k-nucleotide
source secs mem gz busy cpu load
Haskell GHC 22.02 638,132 1486 85.78 97% 99% 97% 97%
C clang 6.01 128,788 1506 12.85 24% 44% 54% 92%
reverse-complement
source secs mem gz busy cpu load
Haskell GHC   Make Error
C clang 0.99 741,472 820 3.94 100% 100% 99% 100%
Haskell GHC

The Glorious Glasgow Haskell Compilation System,
version 9.0.1

C clang

Ubuntu clang version 11.0.0-2