The Computer Language
Benchmarks Game

Haskell GHC programs versus C gcc

by benchmark task performance

fannkuch-redux
source secs mem gz cpu cpu load
Haskell GHC 17.00 6,948 1153 66.65 95% 100% 98% 99%
C gcc 9.07 1,576 910 35.43 100% 99% 98% 94%
spectral-norm
source secs mem gz cpu cpu load
Haskell GHC 4.06 9,848 987 15.70 97% 97% 99% 95%
C gcc 1.98 1,776 1139 7.87 99% 99% 100% 99%
n-body
source secs mem gz cpu cpu load
Haskell GHC 24.48 7,856 1874 25.55 2% 100% 1% 2%
C gcc 9.56 1,000 1490 9.56 1% 100% 1% 1%
reverse-complement
source secs mem gz cpu cpu load
Haskell GHC 1.43 131,184 999 1.59 6% 6% 99% 2%
C gcc 0.42 145,900 812 0.57 0% 26% 20% 100%
binary-trees
source secs mem gz cpu cpu load
Haskell GHC 20.83 817,104 612 65.44 72% 92% 80% 72%
C gcc 3.28 156,780 906 10.12 91% 77% 59% 83%
k-nucleotide
source secs mem gz cpu cpu load
Haskell GHC 41.92 602,836 1463 146.09 87% 95% 91% 89%
C gcc 6.46 130,076 1500 17.06 51% 37% 89% 88%
mandelbrot
source secs mem gz cpu cpu load
Haskell GHC 11.63 44,252 782 46.34 100% 100% 100% 100%
C gcc 1.64 29,848 1135 6.51 100% 100% 100% 100%
fasta
source secs mem gz cpu cpu load
Haskell GHC 15.50 450,024 1296 48.32 76% 76% 87% 77%
C gcc 1.36 2,800 1993 5.26 96% 97% 100% 97%
pidigits
source secs mem gz cpu cpu load
Haskell GHC   Make Error
C gcc 0.06 ? 448 0.06 0% 0% 0% 100%
regex-redux
source secs mem gz cpu cpu load
Haskell GHC   Bad Output
C gcc 0.05 ? 1266 0.06 50% 20% 17% 50%
Haskell GHC

The Glorious Glasgow Haskell Compilation System, version 8.0.1

C gcc

gcc (Ubuntu 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609