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 31,136 1975 5.83 99% 99% 99% 100%
C clang 2.09 26,300 694 8.32 100% 100% 100% 100%
fasta
source secs mem gz busy cpu load
Haskell GHC 0.86 8,008 1882 2.80 83% 80% 81% 81%
C clang 0.88 3,904 2011 3.44 98% 100% 97% 97%
fannkuch-redux
source secs mem gz busy cpu load
Haskell GHC 10.22 4,148 1113 40.27 100% 99% 100% 95%
C clang 9.45 760 1557 36.57 90% 98% 100% 99%
pidigits
source secs mem gz busy cpu load
Haskell GHC 0.89 6,048 1694 0.90 0% 100% 1% 0%
C clang 0.81 2,544 416 0.84 0% 100% 0% 4%
regex-redux
source secs mem gz busy cpu load
Haskell GHC 0.97 308,072 2213 2.32 46% 51% 80% 62%
C clang 0.81 154,176 1397 2.79 77% 83% 85% 99%
spectral-norm
source secs mem gz busy cpu load
Haskell GHC 1.48 4,124 987 5.73 96% 97% 96% 98%
C clang 0.72 3,140 569 2.87 100% 100% 100% 100%
n-body
source secs mem gz busy cpu load
Haskell GHC 6.95 4,188 1883 26.84 95% 95% 100% 95%
C clang 3.31 8 1391 3.32 0% 100% 0% 0%
binary-trees
source secs mem gz busy cpu load
Haskell GHC 4.34 471,032 799 15.56 96% 88% 87% 87%
C clang 1.88 169,452 809 6.16 78% 73% 76% 100%
reverse-complement
source secs mem gz busy cpu load
Haskell GHC 2.92 501,644 1020 3.43 6% 100% 6% 6%
C clang 0.98 585,620 820 3.92 100% 100% 100% 99%
k-nucleotide
source secs mem gz busy cpu load
Haskell GHC 20.11 522,844 1059 74.17 94% 90% 95% 91%
C clang 6.19 128,848 1506 12.79 30% 42% 42% 92%
Haskell GHC

The Glorious Glasgow Haskell Compilation System,
version 8.10.1

C clang

clang version 10.0.0-4ubuntu1