In December 2022, after nearly a decade of development, OCaml 5 was released with a multi-core capable garbage collector. This was an exciting milestone, finally making it possible to write shared-memory parallel programs in OCaml. The new runtime was designed to be easy to adopt: it didn’t disturb OCaml’s FFI, and performance was meant to be only a couple of percentage points slower in single-core mode.
Despite those promising beginnings, moving to the new runtime was harder than we expected. Indeed, We’ve only managed to switch to it this year, after 18 months of research and engineering effort to overcome a significant number of serious performance problems we uncovered.
This talk is essentially about technology transfer: about what it takes to move an academic result from theory into practice. We’ll talk about some of what we learned, both about GC design, and about how to analyze and fix subtle performance regressions in a complex ecosystem.