Sciweavers

MPC
2004
Springer

Optimizing Generic Functions

13 years 10 months ago
Optimizing Generic Functions
Abstract. Generic functions are defined by induction on the structural representation of types. As a consequence, by defining just a single generic operation, one acquires this operation over any particular type. An instance on a specific type is generated by interpretation of the type’s structure. A direct translation leads to extremely inefficient code that involves many conversions between types and their structural representations. In this paper we present an optimization technique based on compile-time symbolic evaluation. We prove that the optimization removes the overhead of the generated code for a considerable class of generic functions. The proof uses typing to identify intermediate data structures that should be eliminated. In essence, the output after optimization is similar to hand-written code.
Artem Alimarine, Sjaak Smetsers
Added 02 Jul 2010
Updated 02 Jul 2010
Type Conference
Year 2004
Where MPC
Authors Artem Alimarine, Sjaak Smetsers
Comments (0)