Chapter 5. Measuring Time and Complexity

IN THIS CHAPTER

In previous chapters, you have seen how to identify parts of programs that are likely candidates for optimization. You have also seen that it is necessary to determine whether it is worth optimizing an existing algorithm, or whether a completely new algorithm is necessary to achieve the necessary performance goals. However, when you have a choice between a large number of algorithms, how do you decide which will be fastest? Do you implement all of them and do speeds tests or can something intelligent be said beforehand? Also, how exactly can you perform speed comparisons easily between different algorithms?

This chapter introduces you ...

Get C++ Footprint and Performance Optimization now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.