ABSTRACT
Virtually every compiler performs transformations on the program it is compiling in an attempt to improve efficiency. Despite their importance, however, there have been few systematic attempts to categorise such transformations and measure their impact.In this paper we describe a particular group of transformations --- the "let-floating" transformations --- and give detailed measurements of their effect in an optimizing compiler for the non-strict functional language Haskell. Let-floating has not received much explicit attention in the past, but our measurements show that it is an important group of transformations (at least for lazy languages), offering a reduction of more than 30% in heap allocation and 15% in execution time.
- AV Aho, R Sethi & JD Ullman {1986}, Compilers - principles, techniques and ~ools, Addison Wesley. Google ScholarDigital Library
- AW Appel {1992}, Compiling with continuations, Cambridge University Press. Google ScholarDigital Library
- Z Ariola, M Felleisen, J Maraist, M Odersky & P Wadler {Jan 1995}, "A call by need lambda calculus," in 21st ACM Symposium on Principles of Programming Languages, San Francisco, ACM. Google ScholarDigital Library
- DF Bacon, SL Graham gc OJ Sharp {Dec 1994}, "Compiler transformations for high-performance computing," ACM Computing Surveys 26, 345-420. Google ScholarDigital Library
- C Flanagan, A Sabry, B Duba & M Felleisen {June 1993}, "The essence of compiling with continuations," SIC- PLAN Notices 28, 237-247. Google ScholarDigital Library
- S Fortune, D Leivant & M O'Donnell{Jan 1983}, "The expressiveness of simple and second-order type structures,'' JACM 30, 151-185. Google ScholarDigital Library
- P Fradet gc D Le Metayer {Jan 1991}, "Compilation of functional languages by program transformation," A CM Transactions on Programming Languages and Systems 13, 21-51. Google ScholarDigital Library
- AJ Gill {Jan 1996}, "Cheap deforestation for non-strict functional languages," PhD thesis, Department of Computing Science, Glasgow University.Google Scholar
- P Hudak, SL Peyton Jones, PL Wadler, Arvind, B Boutel, J Fairbairn, J Fasel, M Guzman, K Hammond, J Hughes, T Johnsson, R Kieburtz, RS Nikhil, W Partain &: J Peterson{May 1992}, "Report on the functional programming language HaskeI1, Version 1.2," SIGPLAN Notices 27.Google Scholar
- RJM Hughes {July 1983}, "The design and implementation of programming languages," PhD thesis, Programming Research Group, Oxford.Google Scholar
- R Kelsey {May 1989}, "Compilation by program transformation,'' YALEU/DCS/RR-702, PhD thesis, Department of Computer Science, Yale University. Google ScholarDigital Library
- R Kelsey 8e P Hudak {Jan 1989}, "Realistic compilation by program transformation," in Proc A CM Conference on Principles of Programming Languages, ACM, 281-292. Google ScholarDigital Library
- DA Kranz {May 1988}, "ORBIT- an optimising compiler for Scheme," PhD thesis, Department of Computer Science, Yale University. Google ScholarDigital Library
- DA Kranz, R Kelsey, J Rees, P Hudak, J Philbin & N Adams {1986}, "ORBIT - an optimising compiler for Scheme," in Proc SIGPLAN Symposium on Cornprier Construction, ACM. Google ScholarDigital Library
- J Launchbury {Jan 1993}, "A natural semantics for lazy evaluation,'' in 20th ACM Symposium on Principles of Programming Languages, Charleston, ACM, 144- 154. Google ScholarDigital Library
- WD Partain {1993}, "The nofib Benchmark Suite of Haskell Programs," in Functional Programming, Glasgow 1992, J Launchbury & PM Sansom, eds., Workshops in Computing, Springer Verlag, 195-202. Google ScholarDigital Library
- SL Peyton Jones {1987}, The Implemenia,ion of Functional Programming Languages, Prentice Hall. Google ScholarDigital Library
- SL Peyton Jones {Apr 1992}, "Implementing lazy functional languages on stock hardware: the Spineless Tagless G-machine," Journal of Functional Programming 2, 127-202.Google ScholarCross Ref
- SL Peyton Jones, CV Hall, K Hammond, WD Partain & PL Wadler {March 1993}, "The Glasgow Haskell compiler: a technical overview," in Proceedings of Joint Framework /or Information Technology Technical Conference, Keele, DTI/SERC, 249-257.Google Scholar
- SL Peyton Jones gc J Launchbury{Sept 1991}, "Unboxed values as first class citizens," in Functional Programming Languages and Computer Architecture, Boston, Hughes, ed., LNCS 523, Springer Verlag, 636-666. Google ScholarDigital Library
- SL Peyton Jones ~ D Lester {May 1991}, "A modular fullylazy lambda lifter in HASKELL," Software - Practice and Experience 21,479-506. Google ScholarDigital Library
- SL Peyton Jones & WD Partain {1993}, "Measuring the effectiveness of a simple strictness analyser," in Funciional Programming, Glasgow 1993, K Hammond & JT O'Donnell, eds., Workshops in Computing, Springer Verlag, 201-220.Google Scholar
- SL Peyton Jones & A Santos {1994}, "Compilation by transformation in the Glasgow Haskell Compiler," in Functional Programming, Glasgow 1994, K Hammond, DN Turner g~ PM Sansom, eds., Workshops in Computing, Springer Verlag, 184-204.Google Scholar
- A Santos {Sept 1995}, "Compilation by transformation in non-strict functional languages," PhD thesis, Department of Computing Science, Glasgow University.Google Scholar
- JE Smith {Oct 1988}, "Characterising computer performance with a single number," Communications of the A CM 31, 1202-1207. Google ScholarDigital Library
Index Terms
- Let-floating: moving bindings to give faster programs
Recommendations
Let-floating: moving bindings to give faster programs
Virtually every compiler performs transformations on the program it is compiling in an attempt to improve efficiency. Despite their importance, however, there have been few systematic attempts to categorise such transformations and measure their ...
Scala macros: let our powers combine!: on how rich syntax and static types work with metaprogramming
SCALA '13: Proceedings of the 4th Workshop on ScalaCompile-time metaprogramming has been proven immensely useful enabling programming techniques such as language virtualization, embedding of external domain-specific languages, self-optimization, and boilerplate generation among many others.
In the ...
Fast floating-point processing in Common Lisp
Lisp, one of the oldest higher-level programming languages, has rarely been used for fast numerical (floating-point) computation. We explore the benefits of Common Lisp, an emerging new language standard with some excellent implementations, for ...
Comments