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 15.40 3,368 1113 60.35 100% 99% 99% 95%
C++ g++ 10.61 2,044 980 41.90 100% 96% 100% 100%
spectral-norm
source secs mem gz cpu cpu load
Haskell GHC 4.04 4,132 987 15.71 97% 100% 95% 97%
C++ g++ 2.02 1,332 1044 7.91 99% 99% 99% 99%
reverse-complement
source secs mem gz cpu cpu load
Haskell GHC 1.40 128,808 1020 1.46 2% 5% 2% 99%
C++ g++ 0.64 247,800 2280 1.03 89% 22% 31% 30%
n-body
source secs mem gz cpu cpu load
Haskell GHC 21.43 3,996 1883 84.71 98% 100% 99% 98%
C++ g++ 8.23 1,856 1763 8.23 100% 1% 1% 0%
k-nucleotide
source secs mem gz cpu cpu load
Haskell GHC 35.01 644,356 1486 122.09 86% 87% 89% 97%
C++ g++ 7.75 165,180 1276 26.02 80% 96% 82% 79%
fasta
source secs mem gz cpu cpu load
Haskell GHC 9.36 5,044 969 9.74 2% 3% 2% 99%
C++ g++ 1.49 4,372 2324 5.28 89% 88% 90% 90%
mandelbrot
source secs mem gz cpu cpu load
Haskell GHC 11.69 38,472 782 46.64 100% 100% 100% 100%
C++ g++ 1.64 27,636 1002 6.51 100% 99% 100% 99%
binary-trees
source secs mem gz cpu cpu load
Haskell GHC 24.81 512,320 538 51.11 35% 39% 98% 36%
C++ g++ 2.55 135,568 809 7.99 85% 96% 69% 66%
regex-redux
source secs mem gz cpu cpu load
Haskell GHC   Bad Output
C++ g++ 0.02 ? 1315 0.06 100% 50% 67% 100%
pidigits
source secs mem gz cpu cpu load
Haskell GHC   Make Error
C++ g++ 0.07 ? 513 0.07 0% 0% 86% 13%
Haskell GHC

The Glorious Glasgow Haskell Compilation System, version 8.2.1

C++ g++

g++ (Ubuntu 7.2.0-8ubuntu3) 7.2.0