PolyP—a polytypic programming language extension
Proceedings of the 24th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Deforestation: Transforming Programs to Eliminate Trees
ESOP '88 Proceedings of the 2nd European Symposium on Programming
IFL'02 Proceedings of the 14th international conference on Implementation of functional languages
Transformation of structure-shy programs: applied to XPath queries and strategic functions
Proceedings of the 2007 ACM SIGPLAN symposium on Partial evaluation and semantics-based program manipulation
A lightweight approach to datatype-generic rewriting
Proceedings of the ACM SIGPLAN workshop on Generic programming
Positive supercompilation for a higher order call-by-value language
Proceedings of the 36th annual ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Comparing approaches to generic programming in Haskell
SSDGP'06 Proceedings of the 2006 international conference on Datatype-generic programming
Transformation of structure-shy programs with application to XPath queries and strategic functions
Science of Computer Programming
Dynamic construction of generic functions
IFL'04 Proceedings of the 16th international conference on Implementation and Application of Functional Languages
Polytypic syntax tree operations
IFL'05 Proceedings of the 17th international conference on Implementation and Application of Functional Languages
With-Loop fusion for data locality and parallelism
IFL'05 Proceedings of the 17th international conference on Implementation and Application of Functional Languages
Hi-index | 0.00 |
Generic programming is accepted by the functional programming community as a valuable tool for program development. Several functional languages have adopted the generic scheme of type-indexed values. This scheme works by specialization of a generic function to a concrete type. However, the generated code is extremely inefficient compared to its hand-written counterpart. The performance penalty is so big that the practical usefulness of generic programming is compromised. In this paper we present an optimization algorithm that is able to completely eliminate the overhead introduced by the specialization scheme for a large class of generic functions. The presented technique is based on consumer–producer elimination as exploited by fusion, a standard general purpose optimization method. We show that our algorithm is able to optimize many practical examples of generic functions.