The Computer Language
Benchmarks Game

Haskell GHC versus C++ g++ fastest programs

by faster benchmark performance

fannkuch-redux
source secs mem gz cpu cpu load
Haskell GHC 18.17 4,024 842 71.56 96% 99% 100% 99%
C++ g++ 10.12 1,852 980 39.95 100% 100% 96% 100%
reverse-complement
source secs mem gz cpu cpu load
Haskell GHC 5.69 501,244 1020 7.57 59% 12% 11% 53%
C++ g++ 2.93 980,716 2280 4.52 51% 23% 33% 51%
spectral-norm
source secs mem gz cpu cpu load
Haskell GHC 4.06 3,620 987 15.71 97% 99% 97% 95%
C++ g++ 1.98 1,164 1044 7.87 99% 99% 99% 100%
pidigits
source secs mem gz cpu cpu load
Haskell GHC 4.22 9,728 379 5.17 45% 11% 10% 64%
C++ g++ 1.89 4,380 513 1.88 2% 99% 4% 2%
n-body
source secs mem gz cpu cpu load
Haskell GHC 21.99 3,984 1883 86.80 99% 98% 100% 99%
C++ g++ 9.42 1,704 1763 9.41 2% 100% 1% 0%
binary-trees
source secs mem gz cpu cpu load
Haskell GHC 13.25 474,224 592 48.76 90% 93% 91% 97%
C++ g++ 3.68 119,052 809 11.93 98% 76% 77% 78%
fasta
source secs mem gz cpu cpu load
Haskell GHC 9.47 4,984 969 9.95 83% 2% 3% 18%
C++ g++ 1.33 1,740 2711 4.29 81% 81% 81% 82%
mandelbrot
source secs mem gz cpu cpu load
Haskell GHC 11.61 38,728 782 46.32 100% 100% 100% 100%
C++ g++ 1.51 25,640 1791 5.99 100% 100% 99% 99%
k-nucleotide
source secs mem gz cpu cpu load
Haskell GHC 35.19 617,884 1486 122.75 87% 87% 88% 88%
C++ g++ 3.73 156,080 1624 11.60 75% 70% 72% 96%
regex-redux
source secs mem gz cpu cpu load
Haskell GHC   Bad Output
C++ g++ 0.45 ? 1315 ? 46% 7% 9% 39%
Haskell GHC

The Glorious Glasgow Haskell Compilation System, version 8.6.2

C++ g++

g++ (Ubuntu 8.2.0-7ubuntu1) 8.2.0