Abstract
Many functional programs are quick and concise to express but large and slow to run. A few critical parts of the program may account for much of the time and space used: replacing these with something cheaper, or applying them less often, significantly improves overall performance of the program. The repetition of this refinement process, starting from a deliberately artless prototype, is a popular strategy for software development. But its effectiveness depends on the ability to identify the “critical parts”, and this is far from easy in a lazy functional language. Commenting on the experiences of a colleague developing a large application with their LML system, Augustsson and Johnsson note that
After long and painful searching in the program he finally found three places where full laziness was lost, each of which accounted for an order of magnitude in time (and it is not guaranteed that all such places were found) ... If a program does not run fast enough it can be quite difficult to find out why [1].
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
References
Augustsson L and Johnsson T. The Chalmers Lazy-ML compiler. Computer Journal, 32 (2): 127–141, April 1989.
Peyton Jones SL. The Implementation of Functional Programming Languages. Prentice-Hall, 1987.
Graham SL, Kessler PB, and McKusick MK. An execution profiler for modular programs. Software — Practice and Experience, 13: 671–686, 1983.
Zorn B and Hilfinger P. A memory allocation profiler for C and LISP programs. USENIX 88, pages 223–237, 1988.
Turner DA. A new implementation technique for applicative languages. SOFTWARE — Practice and Experience, 9 (1): 31–50, January 1979.
Wadler P. Deforestation: Transforming programs to eliminate trees. Theoretical Computer Science, 73 (2): 231–248, June 1990.
Hudak P and Wadler P (editors). Report on the programming language Haskell, a non-strict purely functional language (Version 1.0). Technical report, University of Glasgow, Department of Computer Science, April 1990.
Hartel PH and Veen AH. Statistics on graph reduction of SASL programs. Software — Practice and Experience, 18: 239–253, 1988.
Augustsson L. Compiling Lazy Functional Languages, Part II. PhD thesis, Chalmers University of Technology, S-412 96 Göteborg, November 1987.
Author information
Authors and Affiliations
Editor information
Rights and permissions
Copyright information
© 1991 Springer-Verlag Berlin Heidelberg
About this paper
Cite this paper
Runciman, C., Wakeling, D. (1991). Problems & Proposals for Time & Space Profiling of Functional Programs. In: Jones, S.L.P., Hutton, G., Holst, C.K. (eds) Functional Programming, Glasgow 1990. Workshops in Computing. Springer, London. https://doi.org/10.1007/978-1-4471-3810-5_20
Download citation
DOI: https://doi.org/10.1007/978-1-4471-3810-5_20
Publisher Name: Springer, London
Print ISBN: 978-3-540-19667-9
Online ISBN: 978-1-4471-3810-5
eBook Packages: Springer Book Archive