Open Access
Fusing Generic Functions
A. Alimarine,J.E.W. Smetsers +1 more
- 01 Jan 2004
TL;DR: This paper presents a optimization algorithm that is able to completely eliminate the overhead intoduced by the specialization scheme by exploiting consumer-producer elimination as exploited by fusion, a standard general purpose optimization method.
read more
Abstract: 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 a optimization algorithm that is able to completely eliminate the overhead intoduced 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.
read more
Chat with Paper
AI Agents for this Paper
Find similar papers on Google Scholar, PubMed and Arxiv
Write a critical review of this paper
Analyze citations of this paper to find unaddressed research gaps
Citations
•Dissertation
Generic functional programming conceptual design, implementation and applications
Artem Alimarine
- 01 Jan 2005
Improved fusion for optimizing generics
Artem Alimarine,Sjaak Smetsers +1 more
- 10 Jan 2005
TL;DR: An optimization algorithm that is able to completely eliminate the overhead introduced by the specialization scheme for a large class of generic functions for a standard general purpose optimization method is presented.
References
PolyP—a polytypic programming language extension
Patrik Jansson,Johan Jeuring +1 more
- 01 Jan 1997
TL;DR: This paper extends a functional language with a construct for writing polytypic functions, and infers the types of all other expressions using an extension of Jones' theories of qualified types and higher-order polymorphism.
267
•Journal Article
Better Consumers for Program Specializations.
Wei-Ngan Chin,Siau-Cheng Khoo +1 more
TL;DR: A novel approach for achieving better program specialization by preprocessing a program before subjecting it to actual specialization, which is considerably simpler, yet still widely applicable for nonstrict rst-order programs.
Optimizing Generic Functions
Artem Alimarine,Sjaak Smetsers +1 more
- 12 Jul 2004
TL;DR: It is proved that the optimization removes the overhead of the generated code for a considerable class of generic functions and the output after optimization is similar to hand-written code.
•Book
Semantics With Applications: A Formal Introduction
Hanne Riis Nielson,Flemming Nielson +1 more
- 01 Mar 1992
TL;DR: Axiomatic program verification: direct proofs of program correctness partial correctness assertions soundness and completeness extensions of the axiomatic systems assertions for execution time.