skip to main content
research-article

Rethinking supercompilation

Published:27 September 2010Publication History
Skip Abstract Section

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.

Skip Supplemental Material Section

Supplemental Material

icfp-weds-1425-mitchell.mov

References

  1. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. }}Olaf Chitil. Common subexpressions are uncommon in lazy functional languages. LNCS, 1467:53--71, 1998. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. }}Yoshihiko Futamura. Partial evaluation of computation process - an approach to a compiler-compiler. Higher-Order and Symbolic Computation, 12(4):381--391, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. }}Dimitry Golubovsky, Neil Mitchell, and Matthew Naylor. Yhc.Core - from Haskell to Core. The Monad.Reader, 1(7)45--61, April 2007.Google ScholarGoogle Scholar
  8. }}Thomas Johnsson. Lambda lifting: transforming programs to recursive equations. In Proc. FPCA '85, pages 190--203. Springer-Verlag. 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. }}Neil Jones, Carsten Gomard, and Peter Sestoft. Partial Evaluatiol and Automatic Program Generation. Prentice-Hall International. 1993. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. }}Peter Jonsson and Johan Nordlander. Positive supercompilation for a higher order call-by-value language. In POPL '09, pages 277--288. ACM, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. }}Ilya Klyuchnikov. Supercompiler HOSC 1.0: under the hood. Preprint 63, Keldysh Institute of Applied Mathematics, Moscow. 2009.Google ScholarGoogle Scholar
  12. }}Ilya Klyuchnikov. Supercompiler HOSC 1.1: proof of termination. Preprint 21, Keldysh Institute of Applied Mathematics, Moscow. 2010.Google ScholarGoogle Scholar
  13. }}J Kort. Deforestation of a raytracer. Master's thesis, University of Amsterdam, 1996.Google ScholarGoogle Scholar
  14. }}Joseph Kruskal. Well-quasi-ordering, the tree theorem, and Vazsonyi's conjecture. Transactions of the American Mathematical Society, 95(2):210--255, 1960.Google ScholarGoogle Scholar
  15. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  16. }}Simon Marlow. Deforestation for Higher-Order Functional Programs. PhD thesis, University of Glasgow, 1996.Google ScholarGoogle Scholar
  17. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  18. }}John Meacham. jhc: John's Haskell compiler. http://repetae.net/john/computer/jhc/, 2008.Google ScholarGoogle Scholar
  19. }}Neil Mitchell. Transformation and Analysis of Functional Programs. PhD thesis, University of York, 2008.Google ScholarGoogle Scholar
  20. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. }}Will Partain et al. The nofib Benchmark Suite of Haskell Programs. http://darcs.haskell.org/nofib/, 2008.Google ScholarGoogle Scholar
  22. }}Simon Peyton Jones. Implementing lazy functional languages on stock hardware: The spineless tagless G-machine. JFP, 2(2):127--202, 1992.Google ScholarGoogle ScholarCross RefCross Ref
  23. }}Simon Peyton Jones. Haskell 98 Language and Libraries: The Revised Report. Cambridge University Press, 2003.Google ScholarGoogle Scholar
  24. }}Simon Peyton Jones. Call-pattern specialisation for Haskell programs. In Proc. ICFP '07, pages 327--337. ACM Press, October 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. }}Simon Peyton Jones and Simon Marlow. Secrets of the Glasgow Haskell Compiler inliner. JFP, 12:393--434, July 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  28. }}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 ScholarGoogle Scholar
  29. }}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 ScholarGoogle ScholarDigital LibraryDigital Library
  30. }}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 ScholarGoogle Scholar
  31. }}The GHC Team. The GHC compiler, version 6.12.1. http://www.haskell.org/ghc/, December 2009.Google ScholarGoogle Scholar
  32. }}Andrew Tolmach. An external representation for the GHC core language. http://www.haskell.org/ghc/docs/papers/core.ps.gz. September 2001.Google ScholarGoogle Scholar
  33. }}Valentin Turchin. The concept of a supercompiler. ACM Trans. Program. Lang. Syst., 8(3):292--325, 1986. Google ScholarGoogle ScholarDigital LibraryDigital Library
  34. }}Valentin Turchin. The algorithm of generalization in the supercompiler. In Partial Evaluation and Mixed Copmutation, pages 341--353. North-Holland, 1988.Google ScholarGoogle Scholar
  35. }}Valentin Turchin. Refal-5, Programming Guide & Reference Manual. New England Publishing Co., Holyoke, MA, 1989.Google ScholarGoogle Scholar
  36. }}Philip Wadler. Deforestation: Transforming programs to eliminate trees. Theoretical Computer Science, 73:231--248, 1990. Google ScholarGoogle ScholarDigital LibraryDigital Library
  37. }}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 ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Rethinking supercompilation

    Recommendations

    Comments

    Login options

    Check if you have access through your login credentials or your institution to get full access on this article.

    Sign in

    Full Access

    • Published in

      cover image ACM SIGPLAN Notices
      ACM SIGPLAN Notices  Volume 45, Issue 9
      ICFP '10
      September 2010
      382 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/1932681
      Issue’s Table of Contents
      • cover image ACM Conferences
        ICFP '10: Proceedings of the 15th ACM SIGPLAN international conference on Functional programming
        September 2010
        398 pages
        ISBN:9781605587943
        DOI:10.1145/1863543

      Copyright © 2010 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 27 September 2010

      Check for updates

      Qualifiers

      • research-article

    PDF Format

    View or Download as a PDF file.

    PDF

    eReader

    View online with eReader.

    eReader

    ePub

    View this article in ePub.

    View ePub
    About Cookies On This Site

    We use cookies to ensure that we give you the best experience on our website.

    Learn more

    Got it!