The Computer Language
Benchmarks Game

Haskell GHC versus C clang fastest programs

Always look at the source code.

These are only the fastest programs. 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.47 38,268 1975 5.82 99% 100% 99% 99%
C clang 2.09 31,812 694 8.34 100% 100% 100% 100%
pidigits
source secs mem gz busy cpu load
Haskell GHC 0.75 5,992 1694 0.76 0% 0% 1% 100%
C clang 0.73 2,820 416 0.72 0% 99% 0% 0%
fannkuch-redux
source secs mem gz busy cpu load
Haskell GHC 10.22 3,620 1113 40.23 100% 100% 95% 99%
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,948 1882 2.87 81% 82% 81% 81%
C clang 0.82 3,816 2268 3.26 99% 99% 100% 100%
regex-redux
source secs mem gz busy cpu load
Haskell GHC 0.97 308,028 2213 2.31 64% 46% 81% 47%
C clang 0.82 154,084 1397 2.80 82% 83% 79% 96%
spectral-norm
source secs mem gz busy cpu load
Haskell GHC 1.48 4,044 987 5.71 96% 96% 97% 96%
C clang 0.72 3,056 1139 2.87 100% 100% 100% 100%
n-body
source secs mem gz busy cpu load
Haskell GHC 6.95 4,196 1883 26.83 95% 95% 95% 100%
C clang 3.33 8 1391 3.46 1% 2% 1% 100%
binary-trees
source secs mem gz busy cpu load
Haskell GHC 4.11 519,284 811 15.16 92% 89% 91% 97%
C clang 1.92 169,416 809 6.15 77% 79% 72% 93%
reverse-complement
source secs mem gz busy cpu load
Haskell GHC 2.95 501,572 1020 3.51 6% 6% 6% 100%
C clang 0.99 741,472 820 3.94 100% 100% 99% 100%
k-nucleotide
source secs mem gz busy cpu load
Haskell GHC 20.01 522,656 1059 73.95 90% 91% 95% 94%
C clang 6.01 128,788 1506 12.85 24% 44% 54% 92%
Haskell GHC

The Glorious Glasgow Haskell Compilation System,
version 8.10.1

C clang

Ubuntu clang version 11.0.0-2