Performance and Choosing the Appropriate Container

Figure 15.2 presented the operations common to most of the Standard Library containers. Beyond these operations, each container typically provides a variety of other capabilities. Many of these are common to several containers, but they’re not always equally efficient for each container.

Image Software Engineering Observation 15.2

It’s usually preferable to reuse Standard Library containers rather than developing customized templatized data structures. For novices, vector is typically satisfactory for most applications.

Performance Tip 15.2

Insertion at the back of a vector is efficient. The

Get C++11 for Programmers, Second Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.