The Computer Language
Benchmarks Game

F# .NET Core versus OCaml 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.

spectral-norm
source secs mem gz busy cpu load
F# .NET Core 4.11 34,960 853 15.91 96% 99% 97% 96%
OCaml 15.70 3,740 377 17.99 7% 1% 100% 6%
k-nucleotide
source secs mem gz busy cpu load
F# .NET Core 5.97 183,292 1907 19.71 92% 72% 84% 83%
OCaml 22.04 255,644 1833 63.13 54% 46% 93% 93%
fasta
source secs mem gz busy cpu load
F# .NET Core 1.70 107,124 1350 6.41 93% 99% 94% 92%
OCaml 6.12 202,428 1189 6.17 0% 100% 1% 0%
pidigits
source secs mem gz busy cpu load
F# .NET Core 1.88 35,788 905 1.94 2% 2% 1% 98%
OCaml 6.70 20,044 458 6.81 0% 70% 32% 0%
regex-redux
source secs mem gz busy cpu load
F# .NET Core 8.03 1,069,132 599 11.16 53% 37% 32% 16%
OCaml 25.39 969,100 637 25.58 0% 0% 1% 100%
mandelbrot
source secs mem gz busy cpu load
F# .NET Core 6.47 65,488 897 25.26 97% 100% 97% 97%
OCaml 13.78 5,008 717 54.96 100% 100% 99% 100%
binary-trees
source secs mem gz busy cpu load
F# .NET Core 6.16 735,984 635 22.23 92% 92% 88% 88%
OCaml 9.89 152,952 751 29.31 68% 52% 91% 84%
reverse-complement
source secs mem gz busy cpu load
F# .NET Core 2.94 1,031,376 1140 8.33 54% 37% 95% 97%
OCaml 3.79 33,980 1368 8.76 63% 56% 52% 59%
fannkuch-redux
source secs mem gz busy cpu load
F# .NET Core 16.67 35,304 1097 64.61 93% 97% 98% 100%
OCaml 16.41 29,028 1017 65.57 100% 100% 100% 100%
n-body
source secs mem gz busy cpu load
F# .NET Core 22.76 36,616 1381 23.42 100% 1% 2% 1%
OCaml 21.68 1,556 1251 21.89 0% 100% 1% 0%
F# .NET Core

Microsoft (R) F# Compiler version 10.6.0.0 for F# 4.7
.NET Core SDK 3.0.100
Host Version: 3.0.0; Commit: 95a0a61858
<ServerGarbageCollection>true
<ConcurrentGarbageCollection>true

OCaml

The OCaml native-code compiler, version 4.09.0