Abstract
Supercompilation is a program optimisation technique that is particularly effective at eliminating unnecessary overheads. We have designed a new supercompiler, making many novel choices, including different termination criteria and handling of let bindings. The result is a supercompiler that focuses on simplicity, compiles programs quickly and optimises programs well. We have benchmarked our supercompiler, with some programs running more than twice as fast than when compiled with GHC.
Supplemental Material
- }}Urban Boquist and Thomas Johnsson. The GRIN project: A highly optimising back end for lazy functional languages. In Proc IFL '96, volume 1268 of LNCS, pages 58--84. Springer-Verlag, 1996. Google Scholar
Digital Library
- }}Olaf Chitil. Common subexpressions are uncommon in lazy functional languages. LNCS, 1467:53--71, 1998. Google Scholar
Digital Library
- }}Duncan Coutts, Roman Leshchinskiy, and Don Stewart. Stream fusion: From lists to streams to nothing at all. In Proc ICFP '07, pages 315--326. ACM Press, October 2007. Google Scholar
Digital Library
- }}Cormac Flanagan, Amr Sabry, Bruce Duba, and Matthias Felleisen. The essence of compiling with continuations. In Proc PDLI '93, volume 28(6), pages 237--247. ACM Press, New York, 1993. Google Scholar
Digital Library
- }}Yoshihiko Futamura. Partial evaluation of computation process - an approach to a compiler-compiler. Higher-Order and Symbolic Computation, 12(4):381--391, 1999. Google Scholar
Digital Library
- }}Andrew Gill, John Launchbury, and Simon Peyton Jones. A short cut to deforestation. In Proc FPCA '93, pages 223--232. ACM Press, June 1993. Google Scholar
Digital Library
- }}Dimitry Golubovsky, Neil Mitchell, and Matthew Naylor. Yhc.Core - from Haskell to Core. The Monad.Reader, 1(7)45--61, April 2007.Google Scholar
- }}Thomas Johnsson. Lambda lifting: transforming programs to recursive equations. In Proc. FPCA '85, pages 190--203. Springer-Verlag. 1985. Google Scholar
Digital Library
- }}Neil Jones, Carsten Gomard, and Peter Sestoft. Partial Evaluatiol and Automatic Program Generation. Prentice-Hall International. 1993. Google Scholar
Digital Library
- }}Peter Jonsson and Johan Nordlander. Positive supercompilation for a higher order call-by-value language. In POPL '09, pages 277--288. ACM, 2009. Google Scholar
Digital Library
- }}Ilya Klyuchnikov. Supercompiler HOSC 1.0: under the hood. Preprint 63, Keldysh Institute of Applied Mathematics, Moscow. 2009.Google Scholar
- }}Ilya Klyuchnikov. Supercompiler HOSC 1.1: proof of termination. Preprint 21, Keldysh Institute of Applied Mathematics, Moscow. 2010.Google Scholar
- }}J Kort. Deforestation of a raytracer. Master's thesis, University of Amsterdam, 1996.Google Scholar
- }}Joseph Kruskal. Well-quasi-ordering, the tree theorem, and Vazsonyi's conjecture. Transactions of the American Mathematical Society, 95(2):210--255, 1960.Google Scholar
- }}Michael Leuschel. Homeomorphic embedding for online termination of symbolic methods. In The essence of computation: complexity, analysis, transformation, pages 379--403. Springer-Verlag, 2002. Google Scholar
Digital Library
- }}Simon Marlow. Deforestation for Higher-Order Functional Programs. PhD thesis, University of Glasgow, 1996.Google Scholar
- }}Simon Marlow, Alexey Rodriguez Yakushev, and Simon Peyton Jones. Faster laziness using dynamic pointer tagging. In Proc. ICFP '07, pages 277--288. ACM Press, October 2007. Google Scholar
Digital Library
- }}John Meacham. jhc: John's Haskell compiler. http://repetae.net/john/computer/jhc/, 2008.Google Scholar
- }}Neil Mitchell. Transformation and Analysis of Functional Programs. PhD thesis, University of York, 2008.Google Scholar
- }}Neil Mitchell and Colin Runciman. A supercompiler for core Haskell. In Selected papers from IFL 2007, volume 5083 of LNCS, pages 147--164. Springer-Verlag, May 2008. Google Scholar
Digital Library
- }}Will Partain et al. The nofib Benchmark Suite of Haskell Programs. http://darcs.haskell.org/nofib/, 2008.Google Scholar
- }}Simon Peyton Jones. Implementing lazy functional languages on stock hardware: The spineless tagless G-machine. JFP, 2(2):127--202, 1992.Google Scholar
Cross Ref
- }}Simon Peyton Jones. Haskell 98 Language and Libraries: The Revised Report. Cambridge University Press, 2003.Google Scholar
- }}Simon Peyton Jones. Call-pattern specialisation for Haskell programs. In Proc. ICFP '07, pages 327--337. ACM Press, October 2007. Google Scholar
Digital Library
- }}Simon Peyton Jones and John Launchbury. Unboxed values as first class citizens in a non-strict functional language. In Proc FPCA '91, volume 523 of LNCS, pages 636--666. Springer-Verlag. August 1991. Google Scholar
Digital Library
- }}Simon Peyton Jones and Simon Marlow. Secrets of the Glasgow Haskell Compiler inliner. JFP, 12:393--434, July 2002. Google Scholar
Digital Library
- }}Simon Peyton Jones, Will Partain, and Andre Santos. Let-floating: Moving bindings to give faster programs. In Proc. ICFP '96, pages 1--12. ACM Press, 1996. Google Scholar
Digital Library
- }}Simon Peyton Jones, Andrew Tolmach, and Tony Hoare. Playing by the rules: Rewriting as a practical optimisation technique in GHC. In Proc. Haskell '01, pages 203--233. ACM Press, 2001.Google Scholar
- }}Jens Peter Secher and Morten Sørensen. On perfect supercompilation. In Proceedings of Perspectives of System Informatics, volume 1755 of LNCS, pages 113--127. Springer-Verlag, 2000. Google Scholar
Digital Library
- }}Morten Sørensen and Robert Glück. An algorithm of generalization in positive supercompilation. In Logic Programming: Proceedings of the 1995 International Symposium, pages 465--479. MIT Press, 1995.Google Scholar
- }}The GHC Team. The GHC compiler, version 6.12.1. http://www.haskell.org/ghc/, December 2009.Google Scholar
- }}Andrew Tolmach. An external representation for the GHC core language. http://www.haskell.org/ghc/docs/papers/core.ps.gz. September 2001.Google Scholar
- }}Valentin Turchin. The concept of a supercompiler. ACM Trans. Program. Lang. Syst., 8(3):292--325, 1986. Google Scholar
Digital Library
- }}Valentin Turchin. The algorithm of generalization in the supercompiler. In Partial Evaluation and Mixed Copmutation, pages 341--353. North-Holland, 1988.Google Scholar
- }}Valentin Turchin. Refal-5, Programming Guide & Reference Manual. New England Publishing Co., Holyoke, MA, 1989.Google Scholar
- }}Philip Wadler. Deforestation: Transforming programs to eliminate trees. Theoretical Computer Science, 73:231--248, 1990. Google Scholar
Digital Library
- }}Philip Wadler and Stephen Blott. How to make ad-hoc polymorphism less ad hoc. In Proc. POPL '89, pages 60--76. ACM Press, 1989. Google Scholar
Digital Library
Index Terms
Rethinking supercompilation
Recommendations
Rethinking supercompilation
ICFP '10: Proceedings of the 15th ACM SIGPLAN international conference on Functional programmingSupercompilation is a program optimisation technique that is particularly effective at eliminating unnecessary overheads. We have designed a new supercompiler, making many novel choices, including different termination criteria and handling of let ...
Supercompilation by evaluation
Haskell '10: Proceedings of the third ACM Haskell symposium on HaskellThis paper shows how call-by-need supercompilation can be recast to be based explicitly on an evaluator, contrasting with standard presentations which are specified as algorithms that mix evaluation rules with reductions that are unique to ...
Supercompilation by evaluation
HASKELL '10This paper shows how call-by-need supercompilation can be recast to be based explicitly on an evaluator, contrasting with standard presentations which are specified as algorithms that mix evaluation rules with reductions that are unique to ...







Comments