Abstract | ||
---|---|---|
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 types without requiring modifications to them. 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 complement the runtime concept idiom with an algorithm library that considers both type and concept information to maximize performance when selecting algorithm implementations. We present two implementations, one in ISO C++ and one using an experimental language extension. We use our implementations to describe and measure the performance of runtime-polymorphic analogs of several STL algorithms. The tests demonstrate the effects of different compile-time vs. run-time algorithm selection choices. |
Year | DOI | Venue |
---|---|---|
2010 | 10.1016/j.scico.2009.04.002 | Sci. Comput. Program. |
Keywords | Field | DocType |
generic programming,runtime polymorphic manner,algorithm library,runtime concept,dynamic algorithm selection,standard template library,concept information,stl algorithm,runtime polymorphism,algorithm implementation,runtime concept idiom,iso c,c++,generic algorithm,c,polymorphism | Programming language,Run-time type information,Computer science,Implementation,Theoretical computer science,Algorithm Selection,Generic programming,Dynamic problem,Standard Template Library | Journal |
Volume | Issue | ISSN |
75 | 9 | Science of Computer Programming |
Citations | PageRank | References |
2 | 0.38 | 13 |
Authors | ||
4 |
Name | Order | Citations | PageRank |
---|---|---|---|
Peter Pirkelbauer | 1 | 52 | 9.37 |
Sean Parent | 2 | 23 | 3.16 |
Mat Marcus | 3 | 24 | 2.88 |
Bjarne Stroustrup | 4 | 362 | 96.58 |