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 16.70 7,628 1153 65.63 100% 95% 100% 99%
C++ g++ 10.35 2,624 980 40.60 99% 99% 100% 95%
spectral-norm
source secs mem gz cpu cpu load
Haskell GHC 4.06 9,880 987 15.71 97% 97% 98% 97%
C++ g++ 1.99 1,880 1044 7.89 100% 99% 99% 99%
reverse-complement
source secs mem gz cpu cpu load
Haskell GHC 1.39 132,176 999 1.52 4% 4% 100% 4%
C++ g++ 0.60 211,852 2275 0.98 38% 25% 82% 27%
n-body
source secs mem gz cpu cpu load
Haskell GHC 24.48 6,468 1874 25.62 85% 2% 2% 17%
C++ g++ 9.31 1,052 1544 9.30 1% 1% 1% 100%
mandelbrot
source secs mem gz cpu cpu load
Haskell GHC 11.64 41,180 782 46.40 100% 100% 100% 100%
C++ g++ 1.73 34,064 1002 6.80 98% 98% 98% 99%
fasta
source secs mem gz cpu cpu load
Haskell GHC 14.68 455,088 1296 51.59 89% 87% 88% 91%
C++ g++ 1.48 4,176 2313 5.25 89% 90% 88% 89%
binary-trees
source secs mem gz cpu cpu load
Haskell GHC 26.28 511,444 494 52.69 35% 41% 93% 34%
C++ g++ 2.36 114,404 809 7.69 86% 71% 87% 85%
regex-redux
source secs mem gz cpu cpu load
Haskell GHC   Make Error
C++ g++ 0.21 1,540 853 0.27 9% 5% 77% 64%
k-nucleotide
source secs mem gz cpu cpu load
Haskell GHC   Make Error
C++ g++ 0.42 780 1252 0.72 73% 30% 50% 37%
pidigits
source secs mem gz cpu cpu load
Haskell GHC   Make Error
C++ g++ 0.07 ? 508 0.07 0% 0% 89% 0%
Haskell GHC

The Glorious Glasgow Haskell Compilation System, version 8.0.2

C++ g++

g++ (Ubuntu 6.3.0-12ubuntu2) 6.3.0 20170406