Wed 20 Oct 2021 19:35 - 19:50 at Zurich D - Functional Programming - Mirror Chair(s): Atsushi Igarashi
The popularity of algebraic effect handlers as a programming language feature for user-defined computational effects is steadily growing. Yet, even though efficient runtime representations have already been studied, most handler-based programs are still much slower than hand-written code.
This paper shows that the performance gap can be drastically narrowed (in some cases even closed) by means of type-and-effect directed optimising compilation. Our approach consists of source-to-source transformations in two phases of the compilation pipeline. Firstly, elementary rewrites, aided by judicious function specialisation, exploit the explicit type and effect information of the compiler's core language to aggressively reduce handler applications. Secondly, after erasing the effect information further rewrites in the backend of the compiler emit tight code.
This work comes with a practical implementation: an optimising compiler from \textsc{Eff}, an ML style language with algebraic effect handlers, to \textsc{OCaml}. Experimental evaluation with this implementation demonstrates that in a number of benchmarks, our approach eliminates much of the overhead of handlers, outperforms capability-passing style compilation and yields competitive performance compared to hand-written \textsc{OCaml} code as well Multicore \textsc{OCaml}'s dedicated runtime support.
Wed 20 OctDisplayed time zone: Central Time (US & Canada) change
10:50 - 12:10 | |||
10:50 15mTalk | Compiling with Continuations, CorrectlyVirtual OOPSLA DOI | ||
11:05 15mTalk | Synbit: Synthesizing Bidirectional Programs using Unidirectional SketchesVirtual OOPSLA Masaomi Yamaguchi Tohoku University, Kazutaka Matsuda Tohoku University, Cristina David University of Bristol, Meng Wang University of Bristol DOI | ||
11:20 15mTalk | Reachability Types: Tracking Aliasing and Separation in Higher-Order Functional ProgramsVirtual OOPSLA Yuyan Bao University of Waterloo, Guannan Wei Purdue University, Oliver Bračevac Purdue University, Yuxuan Jiang Purdue University, Qiyang He Purdue University, Tiark Rompf Purdue University DOI | ||
11:35 15mTalk | Efficient Compilation of Algebraic Effect HandlersVirtual OOPSLA Georgios Karachalias Tweag, Filip Koprivec University of Ljubljana; Institute of Mathematics, Matija Pretnar University of Ljubljana; Institute of Mathematics, Tom Schrijvers KU Leuven DOI | ||
11:50 20mLive Q&A | Discussion, Questions and Answers OOPSLA |