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 15.50 7,972 1110 60.67 96% 100% 98% 99%
C gcc 8.97 1,660 910 35.00 98% 94% 99% 100%
spectral-norm
source secs mem gz cpu cpu load
Haskell GHC 4.05 7,800 987 15.70 100% 94% 97% 97%
C gcc 1.99 1,824 1139 7.88 99% 99% 99% 100%
n-body
source secs mem gz cpu cpu load
Haskell GHC 21.45 9,988 1874 84.61 99% 99% 98% 100%
C gcc 9.96 1,016 1490 9.95 1% 1% 1% 100%
reverse-complement
source secs mem gz cpu cpu load
Haskell GHC 1.29 133,992 999 1.36 5% 100% 4% 5%
C gcc 0.42 143,948 812 0.58 15% 26% 98% 2%
k-nucleotide
source secs mem gz cpu cpu load
Haskell GHC 32.33 643,572 1463 124.08 97% 95% 95% 98%
C gcc 5.38 129,772 1499 16.37 61% 82% 89% 74%
mandelbrot
source secs mem gz cpu cpu load
Haskell GHC 11.95 42,008 782 47.64 100% 100% 100% 100%
C gcc 1.65 32,684 1135 6.53 99% 99% 100% 99%
fasta
source secs mem gz cpu cpu load
Haskell GHC 13.70 473,972 1296 45.44 98% 80% 79% 78%
C gcc 1.33 2,856 2249 5.28 100% 99% 100% 99%
binary-trees
source secs mem gz cpu cpu load
Haskell GHC 25.26 673,076 494 52.88 43% 93% 38% 38%
C gcc 2.38 131,728 836 7.70 98% 87% 73% 68%
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.02 ? 1230 0.05 67% 100% 100% 50%
Haskell GHC

The Glorious Glasgow Haskell Compilation System, version 8.2.1

C gcc

gcc (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406