The Computer Language
23.02 Benchmarks Game

F# .NET versus Haskell GHC fastest performance

Always look at the source code.

If the fastest programs are hand-written vector instructions, does the host language matter? You might be more interested in the less optimised programs — more seconds, less gz source code.

fannkuch-redux
source secs mem gz cpu secs
F# .NET #6 8.33 106,496 1097 32.25
F# .NET #5 9.75 111,368 912 38.19
Haskell GHC #5 10.35 11,044 842 41.05
Haskell GHC #4 43.22 11,856 665 43.96
Haskell GHC #6 12.08 24,560 1113 47.27
Haskell GHC #2 47.31 26,764 808 131.54
Haskell GHC 294.61 13,344 559 298.11
Haskell GHC #3   Make Error  
n-body
source secs mem gz cpu secs
F# .NET #6 5.02 108,192 1383 5.00
Haskell GHC #2 6.38 11,064 1883 6.46
F# .NET #3 6.91 106,624 1617 6.90
Haskell GHC 7.15 11,064 1706 7.24
F# .NET #2 7.28 108,408 1381 7.26
F# .NET #4 7.40 108,620 1290 7.38
F# .NET #5 7.47 108,388 1351 7.45
F# .NET   Bad Output  
spectral-norm
source secs mem gz cpu secs
Haskell GHC #2 5.32 11,056 403 5.32
Haskell GHC #4 1.47 11,060 987 5.68
F# .NET #4 1.60 110,572 732 5.86
F# .NET #2 1.63 109,184 853 5.90
mandelbrot
source secs mem gz cpu secs
F# .NET #6 3.83 140,068 933 14.86
F# .NET 4.08 140,580 877 15.88
F# .NET #5 4.09 139,916 897 15.90
Haskell GHC #2 6.57 49,752 782 26.20
Haskell GHC 37.94 263,720 621 38.46
Haskell GHC #3   Make Error  
pidigits
source secs mem gz cpu secs
F# .NET #6 0.99 105,584 905 0.98
F# .NET #4 1.39 106,688 874 1.39
Haskell GHC #6 1.57 18,484 360 1.62
Haskell GHC #4 1.78 20,604 348 1.83
Haskell GHC #3 2.15 20,200 379 2.21
Haskell GHC 2.16 18,456 460 2.22
Haskell GHC #2 2.17 18,460 585 2.23
Haskell GHC #5 121.72 13,724 928 121.82
regex-redux
source secs mem gz cpu secs
Haskell GHC #3 1.07 404,888 2213 2.27
F# .NET #6 2.45 1,131,324 611 5.76
F# .NET #7 4.66 1,325,080 599 6.52
fasta
source secs mem gz cpu secs
Haskell GHC #6 0.84 11,056 1882 2.75
Haskell GHC #4 0.85 41,612 2013 2.79
Haskell GHC #5 0.89 11,928 2000 2.83
F# .NET #3 1.16 137,720 1350 4.13
F# .NET #4 1.29 201,344 1342 4.54
Haskell GHC 5.70 13,808 969 5.78
Haskell GHC #3 6.57 631,152 1088 6.67
Haskell GHC #2 5.51 435,952 1319 16.63
k-nucleotide
source secs mem gz cpu secs
F# .NET #6 4.11 260,772 1907 12.92
F# .NET #2 4.54 272,540 1926 15.96
Haskell GHC #3 10.63 417,640 2261 37.47
Haskell GHC 20.96 546,876 1059 71.24
Haskell GHC #2 21.14 807,308 1486 81.68
reverse-complement
source secs mem gz cpu secs
Haskell GHC #4 3.29 508,216 1041 3.34
Haskell GHC #2 6.47 3,814,876 998 6.56
F# .NET #4   Timed Out  
F# .NET #5   Timed Out  
binary-trees
source secs mem gz cpu secs
Haskell GHC #8 2.02 260,336 799 5.03
Haskell GHC #7 2.93 280,440 811 6.82
Haskell GHC #6 3.65 236,380 592 7.25
Haskell GHC #2 10.64 267,004 491 12.12
Haskell GHC 12.14 672,784 494 13.73
Haskell GHC #5 6.94 680,720 561 15.09
Haskell GHC #3 6.73 666,420 538 15.13
F# .NET #7 5.39 1,718,280 516 16.69
F# .NET

.NET SDK 7.0.102
Host Version: 7.0.2
Commit: d037e070eb
<ServerGarbageCollection>true

Haskell GHC

The Glorious Glasgow Haskell
Compilation System,
version 9.4.4
LLVM version: 13.0.1