The Computer Language
Benchmarks Game

Haskell GHC programs versus C gcc

by benchmark task performance

binary-trees
source secs mem gz cpu cpu load
Haskell GHC 16.98 190,168 612 16.95 0% 0% 1% 100%
C gcc 9.58 100,796 906 9.57 1% 1% 1% 100%
reverse-complement
source secs mem gz cpu cpu load
Haskell GHC 1.30 128,364 999 1.30 2% 2% 1% 99%
C gcc 0.62 125,340 812 0.62 3% 0% 0% 100%
fannkuch-redux
source secs mem gz cpu cpu load
Haskell GHC 56.93 3,232 1153 56.90 0% 2% 1% 100%
C gcc 24.19 636 1183 24.18 1% 1% 0% 100%
spectral-norm
source secs mem gz cpu cpu load
Haskell GHC 18.81 2,336 987 18.80 3% 1% 0% 100%
C gcc 7.85 1,628 569 7.85 1% 1% 1% 100%
n-body
source secs mem gz cpu cpu load
Haskell GHC 30.44 3,500 1874 30.42 1% 1% 0% 100%
C gcc 10.01 740 1490 10.00 1% 1% 0% 100%
k-nucleotide
source secs mem gz cpu cpu load
Haskell GHC 139.13 492,368 1052 136.78 0% 1% 1% 100%
C gcc 23.93 126,832 1500 23.91 0% 1% 1% 100%
fasta
source secs mem gz cpu cpu load
Haskell GHC 23.41 399,264 1296 23.39 0% 1% 1% 100%
C gcc 2.79 640 1261 2.79 1% 1% 0% 100%
pidigits
source secs mem gz cpu cpu load
Haskell GHC   Make Error
C gcc 0.09 ? 448 0.09 10% 0% 0% 100%
mandelbrot
source secs mem gz cpu cpu load
Haskell GHC   Bad Output
C gcc 0.09 ? 782 0.08 10% 0% 0% 100%
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