Sciweavers

ICFP
2007
ACM

Call-pattern specialisation for haskell programs

14 years 4 months ago
Call-pattern specialisation for haskell programs
User-defined data types, pattern-matching, and recursion are ubiquitous features of Haskell programs. Sometimes a function is called with arguments that are statically known to be in constructor form, so that the work of pattern-matching is wasted. Even worse, the argument is sometimes freshly-allocated, only to be immediately decomposed by the function. In this paper we describe a simple, modular transformation that specialises recursive functions according to their argument "shapes". We describe our implementation of this transformation in the Glasgow Haskell Compiler, and give measurements that demonstrate substantial performance improvements: a worthwhile 10% on average, with a factor of 10 in particular cases.
Simon L. Peyton Jones
Added 13 Dec 2009
Updated 13 Dec 2009
Type Conference
Year 2007
Where ICFP
Authors Simon L. Peyton Jones
Comments (0)