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.
Access this chapter
Tax calculation will be finalised at checkout
Purchases are for personal use only
Preview
Unable to display preview. Download preview PDF.
Bibliography
L Augustsson, “Implementing Haskell overloading,” Functional Programming Languages and Computer Architecture, Copenhagen, Denmark, June 1993, 65–73.
M Gardner, “Wheels, Life and Other Mathematical Amusements,” W.H. Freeman and Company, New York, 1993.
CV Hall, “Using Hindley-Milner type inference to optimise list representation,” ACM Conference on Lisp and Functional Programming, Orlando, Florida, June 1994.
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.
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.
F Henglein & J Jorgensen, “Formally optimal boxing,” in 21st ACM Symposium on Principles of Programming Languages, ACM, Portland, Oregon, Jan 1994, 213–226.
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.
John Hughes, “Why functional programming matters,” The Computer Journal 32 (2), April 1989.
MP Jones, “Partial evaluation for dictionary-free overloading,” Research Report YALE/DCS/RR-959, Dept of Computer Science, Yale University, April 1993.
X Leroy, “Unboxed objects and polymorphic typing,” 19th ACM Symposium on Principles of Programming Languages, Albuquerque, New Mexico, Jan 1992, 177–188.
JC Mitchell & R Harper, “On the type structure of Standard ML,” ACM Transactions on Programming Languages and Systems 15(2), April 1993, 211–252.
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.
E Nocker & S Smetsers, “Partially strict non-recursive data types,” Journal of Functional Programming3(2), April 1993, 191–217.
A Ohori & T Takamizawa, “A polymorphic unboxed calculus and efficient compilation of ML,” Research Institute for Mathematical Sciences, Kyoto University, Japan, 1994.
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.
SL Peyton Jones & J Launchbury, “Unboxed values as first class citizens,” Functional Programming Languages and Computer Architecture, Cambridge, Massachusetts, Sept 1991.
C Runciman & D Wakeling, “Heap profiling of lazy functional programs,” Journal of Functional Programming3(2), April 1993, 217–245.
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.
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.
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.
Author information
Authors and Affiliations
Editor information
Editors and Affiliations
Rights 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