Will OCaml 5+ multicore be fragile?

Unrefined thoughts about this:

  • The 5.0 runtime was actually simplified quite a bit compared to the first iterations of the Multicore OCaml design; the process of trading generailty for simplicity (and less bugs) has been going on over the many years the multicore runtime evolved.
  • Yes, certainly many bugs are lurking! It’s a complete rewrite of the runtime, and while a lot of testing has been going on, it is far from being battle-tested as the previous runtime was, so clearly the 5.0 release is going to be rough and unearth some issues we haven’t found about. Note that this is a comment about the current state of the implementation, not about systemic fragility.
  • Yes, multicore runtimes are very complex beasts, especially if you try to (1) be generalist, not make language-level simplification that rule out certain usage patterns, and (2) remain performance-competitive on sequential programs. (2) is a very hard requirement to impose on a parallel runtime, and it is admirable that Multicore OCaml is managing so well. At this point (pre-first-release) we very rarely find notable performance regressions compared to the sequential runtime.
6 Likes