Parallel traversal effect handlers for OCaml
This is an idea proposed in 2024 as a Cambridge Computer Science Part II project, and has been completed by
Most existing uses of effect handlers perform synchronous execution of handled
effects. Xie et al proposed a Parallel Algebraic Effect Handlers describes the traverse handler for parallelisation of
independent effectful computations whose effect handlers are outside the
parallel part of the program. The paper traverse effect
This project aims to:
- implement the
traversehandler in OCaml 5, using single-shot handlersRetrofitting effect handlers onto OCaml, PLDI 2021 describes how the effect system in OCaml works.
- identify a selection of parallel-friendly data structures that might benefit from such parallel traversals
- investigate handlers for alternative traversal strategies beyond the folds support by
traverse - evaluate the performance of such parallel handlers, for instance using Eio's
Domain_pool on a many core machine (ranging from 8--128 cores)EIO is a high-performance direct-style IO library we have been developing for OCaml.