Unboxing using Specialisation

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.

[1]  Simon L. Peyton Jones,et al.  Report on the programming language Haskell: a non-strict, purely functional language version 1.2 , 1992, SIGP.

[2]  Patrick M. Sansom,et al.  Execution profiling for non-strict functional languages , 1994 .

[3]  Peter Thiemann,et al.  Unboxed values and polymorphic typing revisited , 1995, FPCA '95.

[4]  Simon L. Peyton Jones,et al.  Time and space profiling for non-strict, higher-order functional languages , 1995, POPL '95.

[5]  Sjaak Smetsers,et al.  Partially Strict Non-Recursive Data Types , 1993, J. Funct. Program..

[6]  Fritz Henglein,et al.  Formally optimal boxing , 1994, POPL '94.

[7]  Martin Gardner,et al.  Wheels, life, and other mathematical amusements , 1983 .

[8]  John C. Mitchell,et al.  On the type structure of standard ML , 1993, TOPL.

[9]  Robert Harper,et al.  Compiling polymorphism using intensional type analysis , 1995, POPL '95.

[10]  Colin Runciman,et al.  Heap profiling of lazy functional programs , 1993, Journal of Functional Programming.

[11]  Pieter H. Hartel,et al.  Pseudoknot: A Float-Intensive Benchmark for Functional Compilers , 1994 .

[12]  Richard C. H. Connor,et al.  An ad hoc approach to the implementation of polymorphism , 1991, TOPL.

[13]  John Hughes,et al.  Why Functional Programming Matters , 1989, Comput. J..

[14]  Cordelia V. Hall Using Hindley-Milner type inference to optimise list representation , 1994, LFP '94.

[15]  Xavier Leroy,et al.  Unboxed objects and polymorphic typing , 1992, POPL '92.

[16]  Simon L. Peyton Jones,et al.  Imperative functional programming , 1993, POPL '93.

[17]  Philip Wadler,et al.  The Glasgow Haskell Compiler: a technical overview , 1993 .

[18]  John Launchbury,et al.  Unboxed values as first class citizens , 1991 .

[19]  Lennart Augustsson,et al.  Implementing Haskell overloading , 1993, FPCA '93.