When magic meets multicore - OCaml and its elegant era of parallelism
summary
Merlin's type-checker is offloaded to a background domain using OCaml 5 domains and effect handlers, implementing early typing return, cancellation, and parallel pipeline computation; the prototype runs on an experimental branch, processes 2,400 samples, and reports a 41% overall speedup while a 55,000-line file produced an 8s query on a cold cache before the fix. Mutable state introduces data races mitigated by selective mutexing and caching, causing occasional slowdowns that require further investigation.
AI-written summary · about
chapters (11)
- 0:00OCaml introduction
- 1:24OCaml versatility
- 3:09OCaml and Merlin demo
- 8:07Merlin’s language server
- 11:23Merlin bottlenecks
- 16:20Merlin caching
- 22:50Parallelism with early returns
- 27:08Cancellation with effects
- 32:46Mutable state challenges
- 35:35Optimization performance
- 37:17Conclusion
related talks
34mFrom OCaml 4 to 5 and from Parmap to Effects: A legacy code transition story
23mParallel Sequences in Multicore OCaml
18mMulticoretests - Parallel Testing Libraries for OCaml 5.0
25mPriodomainslib: Prioritized Fine-grained Parallelism for Multicore OCaml
30mMonadic interpreters for concurrent memory models: Executable semantics of a concurrent(…)
19mConcurrent Data Structures Made Easy
44mCAN WE FREE CONCURRENT PROGRAMMING FROM THE MONADIC STYLE
15mCosmo: A Concurrent Separation Logic for Multicore Ocaml
