3 ms·
This is an interesting benchmark comparing parallel functional programming languages, including Rust, Parallel OCaml and MPL. MPL is "a parallelism-oriented for
by marcle 6y ago
This is an interesting benchmark comparing parallel functional programming languages, including Rust, Parallel OCaml and MPL. MPL is "a parallelism-oriented fork of MLton for Standard ML" which is described as being "definitely the star" (see also http://www.cs.cmu.edu/~swestric/20/popl-disentangled.pdf http://www.cs.cmu.edu/~swestric/20/popl-disentangled.pdf). This benchmark was inspired by Jon Harrop's ray tracer benchmark (https://www.ffconsultancy.com/languages/ray_tracer/index.html https://www.ffconsultancy.com/languages/ray_tracer/index.htm...).
- kcsrk 6y agoHaving optimised the Multicore OCaml implementation, this benchmark benefits heavily from inlining and unboxing. MLton style aggressive inlining and unboxing is the way to go here. MPL builds on MLton and it works out great! Multicore OCaml compiler doesn’t yet use the new flambda2 optimisation passes. We witnessed good improvements with flambda2 on stock OCaml on the tight loops in this program; the compiler was doing all the right things. It seemed not worthwhile to continue with hand optimising the implementation leading to non-idiomatic FP code. We hope to get back to this once flambda2 Passes are integrated with Multicore OCaml compiler.