The Computer Language
Benchmarks Game

OCaml versus F# .NET Core 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 Core 0.97 34,372 905 0.98 1% 96% 1% 3%
fannkuch-redux
source secs mem gz busy cpu load
OCaml 8.52 19,072 1004 34.08 100% 100% 100% 100%
F# .NET Core 8.91 34,216 1097 34.78 98% 99% 99% 94%
n-body
source secs mem gz busy cpu load
OCaml 6.72 1,464 1251 6.76 0% 100% 0% 1%
F# .NET Core 6.97 34,776 1617 7.28 100% 1% 3% 1%
reverse-complement
source secs mem gz busy cpu load
OCaml 1.66 34,044 1368 4.25 61% 65% 61% 69%
F# .NET Core 1.53 1,030,248 1140 4.24 95% 89% 35% 58%
binary-trees
source secs mem gz busy cpu load
OCaml 4.04 152,736 751 11.19 39% 77% 68% 93%
F# .NET Core 2.71 697,592 635 9.30 89% 88% 82% 84%
mandelbrot
source secs mem gz busy cpu load
OCaml 7.56 4,620 717 30.12 100% 100% 99% 100%
F# .NET Core 3.77 63,096 933 14.76 98% 97% 98% 98%
fasta
source secs mem gz busy cpu load
OCaml 3.27 203,380 1189 3.31 1% 0% 0% 100%
F# .NET Core 1.13 77,452 1350 4.24 96% 96% 90% 94%
regex-redux
source secs mem gz busy cpu load
OCaml 14.84 901,904 637 15.29 100% 0% 1% 1%
F# .NET Core 4.37 985,812 599 6.26 78% 27% 17% 21%
spectral-norm
source secs mem gz busy cpu load
OCaml 5.36 3,436 377 5.37 0% 0% 100% 0%
F# .NET Core 1.56 33,784 853 5.83 94% 92% 96% 92%
k-nucleotide
source secs mem gz busy cpu load
OCaml 14.87 255,560 1833 40.68 48% 50% 86% 90%
F# .NET Core 3.95 182,004 1907 12.46 94% 78% 78% 66%
OCaml

The OCaml native-code compiler, version 4.11.0

F# .NET Core

.NET Core SDK 3.1.301
Host Version: 3.1.5; Commit: 65cd789777
<ServerGarbageCollection>true