PolyP—a polytypic programming language extension
Proceedings of the 24th ACM SIGPLAN-SIGACT symposium on Principles of programming languages
Template meta-programming for Haskell
Proceedings of the 2002 ACM SIGPLAN workshop on Haskell
Scrap your boilerplate: a practical design pattern for generic programming
Proceedings of the 2003 ACM SIGPLAN international workshop on Types in languages design and implementation
MPC '02 Proceedings of the 6th International Conference on Mathematics of Program Construction
A nanopass infrastructure for compiler education
Proceedings of the ninth ACM SIGPLAN international conference on Functional programming
Uniform boilerplate and list processing
Haskell '07 Proceedings of the ACM SIGPLAN workshop on Haskell workshop
Comparing libraries for generic programming in haskell
Proceedings of the first ACM SIGPLAN symposium on Haskell
A lightweight approach to datatype-generic rewriting
Proceedings of the ACM SIGPLAN workshop on Generic programming
Alloy: fast generic transformations for Haskell
Proceedings of the 2nd ACM SIGPLAN symposium on Haskell
Proceedings of the 2010 ACM SIGPLAN workshop on Partial evaluation and program manipulation
Comparing approaches to generic programming in Haskell
SSDGP'06 Proceedings of the 2006 international conference on Datatype-generic programming
Scala macros: let our powers combine!: on how rich syntax and static types work with metaprogramming
Proceedings of the 4th Workshop on Scala
Proceedings of the ACM SIGPLAN 2014 Workshop on Partial Evaluation and Program Manipulation
Hi-index | 0.00 |
Generic programming allows the concise expression of algorithms that would otherwise require large amounts of handwritten code. A number of such systems have been developed over the years, but a common drawback of these systems is poor runtime performance relative to handwritten, non-generic code. Generic-programming systems vary significantly in this regard, but few consistently match the performance of handwritten code. This poses a dilemma for developers. Generic-programming systems offer concision but cost performance. Handwritten code offers performance but costs concision. This paper explores the use of Template Haskell to achieve the best of both worlds. It presents a generic-programming system for Haskell that provides both the concision of other generic-programming systems and the efficiency of handwritten code. Our system gives the programmer a high-level, generic-programming interface, but uses Template Haskell to generate efficient, non-generic code that outperforms existing generic-programming systems for Haskell. This paper presents the results of benchmarking our system against both handwritten code and several other generic-programming systems. In these benchmarks, our system matches the performance of handwritten code while other systems average anywhere from two to twenty times slower.