Efficient Compilation of Algebraic Effect Handlers
summary
An optimizing Eff→OCaml compiler is implemented that uses a two-phase ExEff/NoEff pipeline with type-and-effect directed rewrites, function specialization and a purity-aware translation to remove monadic overhead. Benchmarks (N‑queens and generators) show almost native performance, consistently beating Multicore OCaml and matching or exceeding capability‑passing style code in many cases. Remaining effects are embedded as a free monad, the toolchain and artifacts are on GitHub and Zenodo, and current limits include lack of polymorphic function support.
AI-written summary · about
chapters (4)
related talks
12mCompiling Effect Handlers in Capability-Passing Style
24mFormally Verified Native Code Generation in an Effectful JIT: Turning the CompCe...
54mRevisiting the Evolution of Effects (Invited Talk)
22mEfficient OCaml compilation with Flambda 2
16mAn Intrinsically Typed Compiler for Algebraic Effect Handlers
17mHefty Algebras: Modular Elaboration of Higher-Order Algebraic Effects
15mZero-Overhead Lexical Effect Handlers
15mEffects as Capabilities: Effect Handlers and Lightweight Effect Polymorphism
