Re:Parallel ray tracing benchmark for functional programming...
by marcle on Tuesday July 07, 2020 @01:43PM
(#23761866)
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). This benchmark was inspired by Jon Harrop's ray tracer benchmark (https://www.ffconsultancy.com/languages/ray_tracer/index.htm...).
[ Parent
| on HN ]
Re:Parallel ray tracing benchmark for functional programming...
by kcsrk on Wednesday July 08, 2020 @11:15PM
(#23776609)
Having 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.