Sciweavers

PEPM
1994
ACM

Dictionary-Free Overloading by Partial Evaluation

14 years 4 months ago
Dictionary-Free Overloading by Partial Evaluation
One of the most novel features in the functional programming language Haskell is the system of type classes used to support a combination of overloading and polymorphism. Current implementations of type class overloading are based on the use of dictionary values, passed as extra parameters to overloaded functions. Unfortunately, this can have a significant effect on run-time performance, for example, by reducing the effectiveness of important program analyses and optimizations. This paper describes how a simple partial evaluator can be used to avoid the need for dictionary values at run-time by generating specialized versions of overloaded functions. This eliminates the run-time costs of overloading. Furthermore, and somewhat surprisingly given the presence of multiple versions of some functions, for all of the examples that we have tried so far, specialization actually leads to a reduction in the size of compiled programs.
Mark P. Jones
Added 10 Aug 2010
Updated 10 Aug 2010
Type Conference
Year 1994
Where PEPM
Authors Mark P. Jones
Comments (0)