S. Peyton Jones. Proceedings of the 12th ACM SIGPLAN international conference on Functional programming, page 327--337. New York, NY, USA, ACM, (2007)
DOI: 10.1145/1291151.1291200
Abstract
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.
%0 Conference Paper
%1 citeulike:12376314
%A Peyton Jones, Simon
%B Proceedings of the 12th ACM SIGPLAN international conference on Functional programming
%C New York, NY, USA
%D 2007
%I ACM
%K haskell 68n18-functional-programming-and-lambda-calculus 68n20-compilers-and-interpreters
%P 327--337
%R 10.1145/1291151.1291200
%T Call-pattern specialisation for Haskell programs
%U http://dx.doi.org/10.1145/1291151.1291200
%X 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.
%@ 978-1-59593-815-2
@inproceedings{citeulike:12376314,
abstract = {{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.}},
added-at = {2017-06-29T07:13:07.000+0200},
address = {New York, NY, USA},
author = {Peyton Jones, Simon},
biburl = {https://www.bibsonomy.org/bibtex/2f5aa5f978f4daef7404bd2b924d9a415/gdmcbain},
booktitle = {Proceedings of the 12th ACM SIGPLAN international conference on Functional programming},
citeulike-article-id = {12376314},
citeulike-attachment-1 = {spec-constr.pdf; /pdf/user/gdmcbain/article/12376314/898270/spec-constr.pdf; 1c7487d0879f29facd5f5644b250246b4cd11769},
citeulike-linkout-0 = {http://portal.acm.org/citation.cfm?id=1291220.1291200},
citeulike-linkout-1 = {http://dx.doi.org/10.1145/1291151.1291200},
comment = {recommended at 'stackoverflow':http://stackoverflow.com/questions/10145954/how-can-i-help-specconstr-in-ghc},
doi = {10.1145/1291151.1291200},
file = {spec-constr.pdf},
interhash = {7692cc22d3757596a29d685abe5830ee},
intrahash = {f5aa5f978f4daef7404bd2b924d9a415},
isbn = {978-1-59593-815-2},
keywords = {haskell 68n18-functional-programming-and-lambda-calculus 68n20-compilers-and-interpreters},
location = {Freiburg, Germany},
pages = {327--337},
posted-at = {2013-05-29 00:22:56},
priority = {2},
publisher = {ACM},
series = {ICFP '07},
timestamp = {2019-05-01T06:15:00.000+0200},
title = {{Call-pattern specialisation for Haskell programs}},
url = {http://dx.doi.org/10.1145/1291151.1291200},
year = 2007
}