Sciweavers

SAC
2008
ACM

Runtime concepts for the C++ standard template library

13 years 12 months ago
Runtime concepts for the C++ standard template library
A key benefit of generic programming is its support for producing modules with clean separation. In particular, generic algorithms are written to work with a wide variety of unmodified types. The Runtime concept idiom extends this support by allowing unmodified concrete types to behave in a runtime polymorphic manner. In this paper, we describe one implementation of the runtime concept idiom, in the domain of the C++ standard template library (STL). We describe and measure the performance of runtime-polymorphic analogs of several STL algorithms. We augment the runtime concept idiom by employing a dispatch mechanism that considers both type and concept information to maximize performance when selecting algorithm implementations. We use our implementation to demonstrate the effects of different compile-time vs. run-time algorithm selection choices, and we indicate where improved language and compiler support would be useful. Categories and Subject Descriptors
Peter Pirkelbauer, Sean Parent, Mat Marcus, Bjarne
Added 28 Dec 2010
Updated 28 Dec 2010
Type Journal
Year 2008
Where SAC
Authors Peter Pirkelbauer, Sean Parent, Mat Marcus, Bjarne Stroustrup
Comments (0)