Title of article :
Dynamic algorithm selection for runtime concepts
Author/Authors :
Peter Pirkelbauer، نويسنده , , Sean Parent، نويسنده , , Mat Marcus، نويسنده , , Bjarne Stroustrup، نويسنده ,
Issue Information :
ماهنامه با شماره پیاپی سال 2010
Pages :
14
From page :
773
To page :
786
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.
Keywords :
Generic programming , Runtime polymorphism , C++ , Standard Template Library
Journal title :
Science of Computer Programming
Serial Year :
2010
Journal title :
Science of Computer Programming
Record number :
1080137
Link To Document :
بازگشت