The Computer Language
Benchmarks Game

Haskell GHC programs versus C++ g++

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++ g++ 10.58 2,520 950 41.88 100% 100% 99% 98%
mandelbrot
source secs mem gz cpu cpu load
Haskell GHC 11.63 44,252 782 46.34 100% 100% 100% 100%
C++ g++ 5.82 33,952 726 22.40 96% 95% 95% 100%
spectral-norm
source secs mem gz cpu cpu load
Haskell GHC 4.06 9,848 987 15.70 97% 97% 99% 95%
C++ g++ 2.01 1,792 1044 8.00 100% 100% 100% 100%
reverse-complement
source secs mem gz cpu cpu load
Haskell GHC 1.43 131,184 999 1.59 6% 6% 99% 2%
C++ g++ 0.59 217,564 2275 0.84 26% 78% 12% 34%
n-body
source secs mem gz cpu cpu load
Haskell GHC 24.48 7,856 1874 25.55 2% 100% 1% 2%
C++ g++ 9.30 1,712 1763 9.29 100% 1% 1% 0%
k-nucleotide
source secs mem gz cpu cpu load
Haskell GHC 41.92 602,836 1463 146.09 87% 95% 91% 89%
C++ g++ 7.15 164,080 1252 24.21 82% 83% 80% 96%
binary-trees
source secs mem gz cpu cpu load
Haskell GHC 20.83 817,104 612 65.44 72% 92% 80% 72%
C++ g++ 3.36 158,320 846 10.59 81% 82% 78% 75%
fasta
source secs mem gz cpu cpu load
Haskell GHC 15.50 450,024 1296 48.32 76% 76% 87% 77%
C++ g++ 1.47 9,484 2291 5.13 88% 88% 87% 88%
regex-redux
source secs mem gz cpu cpu load
Haskell GHC   Bad Output
C++ g++ 0.08 ? 700 0.12 13% 0% 50% 89%
pidigits
source secs mem gz cpu cpu load
Haskell GHC   Make Error
C++ g++ 0.07 ? 508 0.07 0% 13% 100% 0%
Haskell GHC

The Glorious Glasgow Haskell Compilation System, version 8.0.1

C++ g++

g++ (Ubuntu 5.4.0-6ubuntu1~16.04.1) 5.4.0 20160609