The Computer Language
Benchmarks Game

OCaml versus F# .NET fastest programs

Always look at the source code.

These are only the fastest programs. Look at the other programs. They may seem more-like a fair comparison to you.

pidigits
source secs mem gz busy cpu load
OCaml 0.74 6,144 593 0.78 0% 0% 100% 4%
F# .NET 0.82 34,428 905 0.83 1% 2% 96% 1%
n-body
source secs mem gz busy cpu load
OCaml 6.72 1,464 1251 6.76 0% 100% 0% 1%
F# .NET 6.88 34,744 1617 6.92 0% 100% 1% 0%
fannkuch-redux
source secs mem gz busy cpu load
OCaml 8.52 19,072 1004 34.08 100% 100% 100% 100%
F# .NET 8.65 31,784 1097 33.57 98% 99% 94% 98%
reverse-complement
source secs mem gz busy cpu load
OCaml 1.66 34,044 1368 4.25 61% 65% 61% 69%
F# .NET 1.51 1,030,852 1140 4.19 93% 36% 58% 91%
binary-trees
source secs mem gz busy cpu load
OCaml 4.04 152,736 751 11.19 39% 77% 68% 93%
F# .NET 2.73 719,880 635 9.33 80% 89% 87% 85%
mandelbrot
source secs mem gz busy cpu load
OCaml 7.56 4,620 717 30.12 100% 100% 99% 100%
F# .NET 3.77 64,912 933 14.73 99% 97% 98% 97%
fasta
source secs mem gz busy cpu load
OCaml 3.27 203,380 1189 3.31 1% 0% 0% 100%
F# .NET 1.14 120,528 1350 4.18 94% 94% 89% 91%
spectral-norm
source secs mem gz busy cpu load
OCaml 5.36 3,436 377 5.37 0% 0% 100% 0%
F# .NET 1.55 31,916 853 5.83 92% 98% 93% 93%
k-nucleotide
source secs mem gz busy cpu load
OCaml 14.87 255,560 1833 40.68 48% 50% 86% 90%
F# .NET 3.65 184,680 1907 12.58 94% 84% 85% 83%
regex-redux
source secs mem gz busy cpu load
OCaml 14.84 901,904 637 15.29 100% 0% 1% 1%
F# .NET 2.85 1,301,192 611 7.36 51% 92% 59% 56%
OCaml

The OCaml native-code compiler, version 4.11.0

F# .NET

.NET SDK 5.0.100
Host Version: 5.0.0; Commit: cf258a14b7
<ServerGarbageCollection>true