Sciweavers

OOPSLA
2009
Springer

Minimizing dependencies within generic classes for faster and smaller programs

14 years 7 months ago
Minimizing dependencies within generic classes for faster and smaller programs
Generic classes can be used to improve performance by allowing compile-time polymorphism. But the applicability of compile-time polymorphism is narrower than that of runtime polymorphism, and it might bloat the object code. We advocate a programming principle whereby a generic class should be implemented in a way that minimizes the dependencies between its members (nested types, methods) and its generic type parameters. Conforming to this principle (1) reduces the bloat and (2) gives rise to a previously unconceived manner of using the language that expands the applicability of compile-time polymorphism to a wider range of problems. Our contribution is thus a programming technique that generates faster and smaller programs. We apply our ideas to GCC’s STL containers and iterators, and we demonstrate notable speedups and reduction in object code size (real ap
Dan Tsafrir, Robert W. Wisniewski, David F. Bacon,
Added 27 May 2010
Updated 27 May 2010
Type Conference
Year 2009
Where OOPSLA
Authors Dan Tsafrir, Robert W. Wisniewski, David F. Bacon, Bjarne Stroustrup
Comments (0)