Automatic transformation of series expressions into loops
ACM Transactions on Programming Languages and Systems (TOPLAS)
FPCA '93 Proceedings of the conference on Functional programming languages and computer architecture
Deforestation: Transforming Programs to Eliminate Trees
ESOP '88 Proceedings of the 2nd European Symposium on Programming
Towards a theory of type structure
Programming Symposium, Proceedings Colloque sur la Programmation
The nofib Benchmark Suite of Haskell Programs
Proceedings of the 1992 Glasgow Workshop on Functional Programming
LLVM: A Compilation Framework for Lifelong Program Analysis & Transformation
Proceedings of the international symposium on Code generation and optimization: feedback-directed and runtime optimization
System F with type equality coercions
TLDI '07 Proceedings of the 2007 ACM SIGPLAN international workshop on Types in languages design and implementation
Stream fusion: from lists to streams to nothing at all
ICFP '07 Proceedings of the 12th ACM SIGPLAN international conference on Functional programming
Call-pattern specialisation for Haskell programs
ICFP '07 Proceedings of the 12th ACM SIGPLAN international conference on Functional programming
A Haskell Hosted DSL for Writing Transformation Systems
DSL '09 Proceedings of the IFIP TC 2 Working Conference on Domain-Specific Languages
Joint parsing and alignment with weakly synchronized grammars
HLT '10 Human Language Technologies: The 2010 Annual Conference of the North American Chapter of the Association for Computational Linguistics
Proceedings of the third ACM Haskell symposium on Haskell
Parsing Techniques: A Practical Guide
Parsing Techniques: A Practical Guide
IFL'10 Proceedings of the 22nd international conference on Implementation and application of functional languages
TLDI '12 Proceedings of the 8th ACM SIGPLAN workshop on Types in language design and implementation
The HERMIT in the machine: a plugin for the interactive transformation of GHC core language programs
Proceedings of the 2012 Haskell Symposium
Sneaking around concatMap: efficient combinators for dynamic programming
Proceedings of the 17th ACM SIGPLAN international conference on Functional programming
Exploiting vector instructions with generalized stream fusio
Proceedings of the 18th ACM SIGPLAN international conference on Functional programming
Data flow fusion with series expressions in Haskell
Proceedings of the 2013 ACM SIGPLAN symposium on Haskell
Hi-index | 0.00 |
Stream Fusion, a popular deforestation technique in the Haskell community, cannot fuse the concatMap combinator. This is a serious limitation, as concatMap represents computations on nested streams. The original implementation of Stream Fusion used the Glasgow Haskell Compiler's user-directed rewriting system. A transformation which allows the compiler to fuse many uses of concatMap has previously been proposed, but never implemented, because the host rewrite system was not expressive enough to implement the proposed transformation. In this paper, we develop a custom optimization plugin which implements the proposed concatMap transformation, and study the effectiveness of the transformation in practice. We also provide a new translation scheme for list comprehensions which enables them to be optimized. Within this framework, we extend the transformation to monadic streams. Code featuring uses of concatMap experiences significant speedup when compiled with this optimization. This allows Stream Fusion to outperform its rival, foldr/build, on many list computations, and enables performance-sensitive code to be expressed at a higher level of abstraction.