Selective Lambda Lifting
Sebastian Graf, Simon Peyton Jones

TL;DR
This paper revisits selective lambda lifting as an optimization in modern functional language compilers, proposing heuristics and static analysis to identify beneficial lifting opportunities, resulting in modest speedups in Haskell benchmarks.
Contribution
It introduces heuristics and static analysis for selective lambda lifting in modern compilers, enhancing code optimization strategies.
Findings
Modest speedups observed in Haskell benchmarks.
Heuristics effectively identify beneficial lifting opportunities.
Static analysis estimates impact on heap allocations.
Abstract
Lambda lifting is a well-known transformation, traditionally employed for compiling functional programs to supercombinators. However, more recent abstract machines for functional languages like OCaml and Haskell tend to do closure conversion instead for direct access to the environment, so lambda lifting is no longer necessary to generate machine code. We propose to revisit selective lambda lifting in this context as an optimising code generation strategy and conceive heuristics to identify beneficial lifting opportunities. We give a static analysis for estimating impact on heap allocations of a lifting decision. Performance measurements of our implementation within the Glasgow Haskell Compiler on a large corpus of Haskell benchmarks suggest modest speedups.
Peer Reviews
No public reviews on file for this paper yet. If you reviewed it on a platform where reviews are public (OpenReview, ICLR, NeurIPS, ICML), you can paste yours below so the community can read it here.
Code & Models
Videos
No videos yet. Explain this paper in a talk, walkthrough, or lecture? Add one.
Taxonomy
TopicsLogic, programming, and type systems · Security and Verification in Computing · Software Engineering Research
