News for hackers. Stuff that matters.
Re:OCaml Multicore merged upstream by ackfoobar on Monday January 10, 2022 @11:31AM (#29877305)
I believe the less scary race in Java implies a lower performance upper bound. Does the nicer guarantees in multicore OCaml have the same drawback? I.e. even less than Java?
Re:OCaml Multicore merged upstream by avsm on Monday January 10, 2022 @11:40AM (#29877453)
(co-author of the OCaml memory model paper here)

The details of the 'LDRF' (local data race freedom) property are described in detail here: https://anil.recoil.org/papers/2018-pldi-memorymodel.pdf

The performance numbers are in the paper abstract: "our evaluation demonstrates that it is possible to balance a comprehensible memory model with a reasonable (no overhead on x86, ~0.6% on ARM) sequential performance trade-off in a mainstream programming language". It's a little higher on PowerPC but still very usable, and RISC-V overheads should be roughly comparable to ARM.

Re:OCaml Multicore merged upstream by gadmm on Monday January 10, 2022 @11:46AM (#29877545)
As the paper clarifies, this is for the performance of non-atomic read/writes in sequential setting. The paper left the performance evaluation for atomic read/writes to future work. Is there any indication yet regarding the performance in a parallel setting compared to weaker guarantees?
Re:OCaml Multicore merged upstream by avsm on Monday January 10, 2022 @11:50AM (#29877601)
That's right -- we first wanted to establish that existing OCaml code wouldn't be adversely impacted. There are various efforts ongoing to build interested (locked and lock-free) concurrent data structures, so that will inform the parallel performance results. Nothing published yet.
Re:OCaml Multicore merged upstream by nextaccountic on Monday January 10, 2022 @12:18PM (#29878061)
Does this feature inhibit any kind of optimization that current compilers could perform?
Re:OCaml Multicore merged upstream by gadmm on Monday January 10, 2022 @03:36PM (#29881931)
According to the paper “any compiler optimisation that breaks the load-to-store ordering is disallowed.”