4 ms·
Multicore is almost entirely backwards compatible with stock OCaml. One issue is C libraries that use so-called naked pointers but these are discouraged anyway
by sadiq 6y ago
Multicore is almost entirely backwards compatible with stock OCaml.
One issue is C libraries that use so-called naked pointers but these are discouraged anyway and 4.12 ships a detector to find these: https://discuss.ocaml.org/t/ann-a-dynamic-checker-for-detecting-naked-pointers/5805 https://discuss.ocaml.org/t/ann-a-dynamic-checker-for-detect...
There are also two functions on the Obj module which aren't supported because they're unsafe to do concurrently. These are clearly marked as "not for the casual user" so their use is relatively rare.
With regards to performance, you can find a fairly detailed analysis in our ICFP 20 paper: https://arxiv.org/abs/2004.11663 https://arxiv.org/abs/2004.11663 In short, the impact is 3-4% across those benchmarks.
You can grab the current multicore compiler on https://github.com/ocaml-multicore/ocaml-multicore https://github.com/ocaml-multicore/ocaml-multicore and give it a spin to see, today.