Friday, 11 May 2012

Standard Template Library


The Standard Template Library (STL) is a powerful combination of containers and generic algorithms. From a performance perspective, a few questions immediately come to mind:

The STL comes bundled with performance guarantees of the asymptotic complexity of the various containers and algorithms. What does it really mean?

The STL consists of many containers. Faced with a given computational task, what containers should I use? Are some better than others for a given scenario?

How good is the performance of the STL? Can I do better by rolling my own home-grown containers and algorithms?

We will address these and other related issues in this chapter.

Even though we often refer to "the STL performance," it should be noted that the STL has various distinct implementations with varying degrees of performance. The measurements provided in this chapter are a reflection of one popular implementation. The observations we make, however, should apply to STL implementations in general.


0 comments:

Post a Comment