Skip to main content

Problems & Proposals for Time & Space Profiling of Functional Programs

  • Conference paper
Functional Programming, Glasgow 1990

Part of the book series: Workshops in Computing ((WORKSHOPS COMP.))

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].

This is a preview of subscription content, log in via an institution to check access.

Access this chapter

Chapter
USD 29.95
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
eBook
USD 39.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 54.99
Price excludes VAT (USA)
  • Compact, lightweight edition
  • Dispatched in 3 to 5 business days
  • Free shipping worldwide - see info

Tax calculation will be finalised at checkout

Purchases are for personal use only

Institutional subscriptions

Preview

Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.

References

  1. Augustsson L and Johnsson T. The Chalmers Lazy-ML compiler. Computer Journal, 32 (2): 127–141, April 1989.

    Article  Google Scholar 

  2. Peyton Jones SL. The Implementation of Functional Programming Languages. Prentice-Hall, 1987.

    Google Scholar 

  3. Graham SL, Kessler PB, and McKusick MK. An execution profiler for modular programs. Software — Practice and Experience, 13: 671–686, 1983.

    Article  MATH  Google Scholar 

  4. Zorn B and Hilfinger P. A memory allocation profiler for C and LISP programs. USENIX 88, pages 223–237, 1988.

    Google Scholar 

  5. Turner DA. A new implementation technique for applicative languages. SOFTWARE — Practice and Experience, 9 (1): 31–50, January 1979.

    Article  MATH  Google Scholar 

  6. Wadler P. Deforestation: Transforming programs to eliminate trees. Theoretical Computer Science, 73 (2): 231–248, June 1990.

    Article  MathSciNet  MATH  Google Scholar 

  7. 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.

    Google Scholar 

  8. Hartel PH and Veen AH. Statistics on graph reduction of SASL programs. Software — Practice and Experience, 18: 239–253, 1988.

    Article  Google Scholar 

  9. Augustsson L. Compiling Lazy Functional Languages, Part II. PhD thesis, Chalmers University of Technology, S-412 96 Göteborg, November 1987.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Simon L. Peyton Jones Graham Hutton Carsten Kehler Holst

Rights and permissions

Reprints 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

Publish with us

Policies and ethics