Skip to main content

Unboxing using Specialisation

  • Conference paper
Functional Programming, Glasgow 1994

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

Abstract

In performance-critical parts of functional programs substantial performance improvements can be achieved by using unboxed, instead of boxed, data types. Unfortunately, polymorphic functions and data types cannot directly manipulate unboxed values, precisely because they do not conform to the standard boxed representation. Instead, specialised, monomorphic versions of these functions and data types, which manipulate the unboxed values, have to be created. This can be a very tiresome and error prone business, since specialising one function often requires the functions and data types it uses to be specialised as well. In this paper we show how to automate these tiresome consequential changes, leaving the programmer to concentrate on where to introduce unboxed data types in the first place.

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 84.99
Price excludes VAT (USA)
  • Available as PDF
  • Read on any device
  • Instant download
  • Own it forever
Softcover Book
USD 109.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.

Bibliography

  1. L Augustsson, “Implementing Haskell overloading,” Functional Programming Languages and Computer Architecture, Copenhagen, Denmark, June 1993, 65–73.

    Google Scholar 

  2. M Gardner, “Wheels, Life and Other Mathematical Amusements,” W.H. Freeman and Company, New York, 1993.

    Google Scholar 

  3. CV Hall, “Using Hindley-Milner type inference to optimise list representation,” ACM Conference on Lisp and Functional Programming, Orlando, Florida, June 1994.

    Google Scholar 

  4. R Harper & G Morrisett, “Compiling Polymorphism Using Intensional Type Analysis,” Technical Report CMU-CS-94–185, School of Computer Science, Carnegie Mellon University, Sept 1994.

    Google Scholar 

  5. PH Hartel et al., “Pseudoknot: a float-intensive benchmark for functional compilers,” in Proc Sixth International Workshop on the Implementation of Functional Languages, Norwich, JRW Glauert, ed., University of East Anglia, Norwich, Sept 1994.

    Google Scholar 

  6. F Henglein & J Jorgensen, “Formally optimal boxing,” in 21st ACM Symposium on Principles of Programming Languages, ACM, Portland, Oregon, Jan 1994, 213–226.

    Google Scholar 

  7. 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, “Report on the functional programming language Haskell, Version 1.2,” ACM SIGPLAN Notices 27 (5), May 1992.

    Google Scholar 

  8. John Hughes, “Why functional programming matters,” The Computer Journal 32 (2), April 1989.

    Google Scholar 

  9. MP Jones, “Partial evaluation for dictionary-free overloading,” Research Report YALE/DCS/RR-959, Dept of Computer Science, Yale University, April 1993.

    Google Scholar 

  10. X Leroy, “Unboxed objects and polymorphic typing,” 19th ACM Symposium on Principles of Programming Languages, Albuquerque, New Mexico, Jan 1992, 177–188.

    Google Scholar 

  11. JC Mitchell & R Harper, “On the type structure of Standard ML,” ACM Transactions on Programming Languages and Systems 15(2), April 1993, 211–252.

    Google Scholar 

  12. R Morrison, A Dearle, RCH Conner & AL Brown, “An ad-hoc approach to the implementation of polymorphism,” ACM Transactions on Programming Languages and Systems 13 (3), July 1991, 342–371.

    Article  Google Scholar 

  13. E Nocker & S Smetsers, “Partially strict non-recursive data types,” Journal of Functional Programming3(2), April 1993, 191–217.

    Google Scholar 

  14. A Ohori & T Takamizawa, “A polymorphic unboxed calculus and efficient compilation of ML,” Research Institute for Mathematical Sciences, Kyoto University, Japan, 1994.

    Google Scholar 

  15. SL Peyton Jones, CV Hall, K Hammond, WD Partain & PL Wadler, “The Glasgow Haskell compiler: a technical overview,” Joint Framework for Information Technology (JFIT) Technical Conference Digest, Keele, March 1993, 249–257.

    Google Scholar 

  16. SL Peyton Jones & J Launchbury, “Unboxed values as first class citizens,” Functional Programming Languages and Computer Architecture, Cambridge, Massachusetts, Sept 1991.

    Google Scholar 

  17. C Runciman & D Wakeling, “Heap profiling of lazy functional programs,” Journal of Functional Programming3(2), April 1993, 217–245.

    Google Scholar 

  18. PM Sansom, “Execution profiling for non-strict functional languages,” PhD thesis, Research Report FP-1994–09, Dept of Computing Science, University of Glasgow, Sept 1994.

    Google Scholar 

  19. PM Sansom & SL Peyton Jones, “Time and space profiling for non-strict, higher-order functional languages,” 22nd ACM Symposium on Principles of Programming Languages, San Francisco, California, Jan 1995.

    Google Scholar 

  20. PJ Thiemann, “Unboxed values and polymorphic typing revisited,” in Proc Sixth International Workshop on the Implementation of Functional Languages, Norwich, JRW Glauert, ed., University of East Anglia, Norwich, Sept 1994.

    Google Scholar 

Download references

Author information

Authors and Affiliations

Authors

Editor information

Editors and Affiliations

Rights and permissions

Reprints and permissions

Copyright information

© 1995 Springer-Verlag London

About this paper

Cite this paper

Hall, C., Jones, S.L.P., Sansom, P.M. (1995). Unboxing using Specialisation. In: Hammond, K., Turner, D.N., Sansom, P.M. (eds) Functional Programming, Glasgow 1994. Workshops in Computing. Springer, London. https://doi.org/10.1007/978-1-4471-3573-9_7

Download citation

  • DOI: https://doi.org/10.1007/978-1-4471-3573-9_7

  • Publisher Name: Springer, London

  • Print ISBN: 978-3-540-19914-4

  • Online ISBN: 978-1-4471-3573-9

  • eBook Packages: Springer Book Archive

Publish with us

Policies and ethics