Time Profiling a Lazy Functional Compiler
Recent years has seen the development of profiling tools for lazy functional language implementations. This paper presents the results of using a time profiler to profile the Glasgow Haskell compiler. So far as we know ghc is the only lazy functional language compiler to support source-level time profiling. The benefits of having such a tool can be spectacular, as this paper demonstrates.
KeywordsExecution Time Time Profile Garbage Collection Total Execution Time Functional Program
Unable to display preview. Download preview PDF.
- 1.C Clack, S Clayman & D Parrott, “Lexical Profiling: Theory and Practice,” Dept of Computer Science, University College London, April 1993, Submitted to Journal of Functional Programming.Google Scholar
- 2.K Hammond, “Efficient type inference using monads,” in Functional Programming, Glasgow 1991, R Heldal, CK Hoist & P Wadler, eds., Springer-Verlag, Workshops in Computing, Portree, Scotland, Aug 1991.Google Scholar
- 3.J Launchbury, “Lazy imperative programming,” in Proceedings of ACM Sig-plan Workshop on State in Programming Languages, Copenhagen (available as YALEU/DCS/RR-968, Yale University), June 1993, 46–56.Google Scholar
- 4.SL Peyton Jones, “Implementing lazy functional languages on stock hardware: the Spineless Tagless G-machine,” Journal of Functional Programming 2(Apr 1992), 127–202.Google Scholar
- 5.SL Peyton Jones, CV Hall, K Hammond, WD Partain & PL Wadler, “The Glasgow Haskell compiler: a technical overview,” in Joint Framework for Information Technology Technical Conference, Keele, March 1993.Google Scholar
- 6.C Runciman & D Wakeling, “Heap profiling of lazy functional programs,” Journal of Functional Programming 3 (April 1993).Google Scholar
- 7.C Runciman & D Wakeling, “Problems and proposals for time and space profiling of functional programs,” in Functional Programming, Glasgow 1990, SL Peyton Jones, G Hutton & CK Holst, eds., Springer-Verlag, Workshops in Computing, Ullapool, Scotland, Aug 1990.Google Scholar
- 8.C Runciman & D Wakeling, “Heap profiling of a lazy functional compiler,” in Functional Programming, Glasgow 1992, J Launchbury & PM Sansom, eds., Springer-Verlag, Workshops in Computing, Ayr, Scotland, July 1992.Google Scholar
- 9.PM Sansom & SL Peyton Jones, “Profiling lazy functional programs,” in Functional Programming, Glasgow 1992, J Launchbury & PM Sansom, eds., Springer-Verlag, Workshops in Computing, Ayr, Scotland, July 1992.Google Scholar
- 10.PM Sansom & SL Peyton Jones, “Generational garbage collection for Haskell,” in Functional Programming Languages and Computer Architecture, Copenhagen, ACM, June 1993.Google Scholar
- 11.J Sparud, “Fixing some space leaks without a garbage collector,” in Functional Programming Languages and Computer Architecture, Copenhagen, ACM, June 1993.Google Scholar
- 12.PL Wadler, “Comprehending Monads,” in 1990 ACM Conference on Lisp and Functional Programming, Nice, France, June 1990.Google Scholar