Books & Videos

Table of Contents

  1. Chapter 1 An Overview of Optimization

    1. Optimization Is Part of Software Development

    2. Optimization Is Effective

    3. It’s OK to Optimize

    4. A Nanosecond Here, a Nanosecond There

    5. Summary of Strategies for Optimizing C++ Code

    6. Summary

  2. Chapter 2 Computer Behavior Affecting Optimization

    1. Lies C++ Believes About Computers

    2. The Truth About Computers

    3. C++ Tells Lies Too

    4. Summary

  3. Chapter 3 Measure Performance

    1. The Optimizing Mindset

    2. Perform Experiments

    3. Profile Program Execution

    4. Time Long-Running Code

    5. Estimate Code Cost to Find Hot Code

    6. Other Ways to Find Hot Spots

    7. Summary

  4. Chapter 4 Optimize String Use: A Case Study

    1. Why Strings Are a Problem

    2. First Attempt at Optimizing Strings

    3. Second Attempt at Optimizing Strings

    4. Eliminate String Conversion

    5. Summary

  5. Chapter 5 Optimize Algorithms

    1. Time Cost of Algorithms

    2. Toolkit to Optimize Searching and Sorting

    3. Efficient Search Algorithms

    4. Efficient Sort Algorithms

    5. Optimization Patterns

    6. Summary

  6. Chapter 6 Optimize Dynamically Allocated Variables

    1. C++ Variables Refresher

    2. C++ Dynamic Variable API Refresher

    3. Reduce Use of Dynamic Variables

    4. Reduce Reallocation of Dynamic Variables

    5. Eliminate Unneeded Copying

    6. Implement Move Semantics

    7. Flatten Data Structures

    8. Summary

  7. Chapter 7 Optimize Hot Statements

    1. Remove Code from Loops

    2. Remove Code from Functions

    3. Optimize Expressions

    4. Optimize Control Flow Idioms

    5. Summary

  8. Chapter 8 Use Better Libraries

    1. Optimize Standard Library Use

    2. Optimize Existing Libraries

    3. Design Optimized Libraries

    4. Summary

  9. Chapter 9 Optimize Searching and Sorting

    1. Key/Value Tables Using std::map and std::string

    2. Toolkit to Improve Search Performance

    3. Optimize Search Using std::map

    4. Optimize Search Using the <algorithm> Header

    5. Optimize Search in Hashed Key/Value Tables

    6. Stepanov’s Abstraction Penalty

    7. Optimize Sorting with the C++ Standard Library

    8. Summary

  10. Chapter 10 Optimize Data Structures

    1. Get to Know the Standard Library Containers

    2. std::vector and std::string

    3. std::deque

    4. std::list

    5. std::forward_list

    6. std::map and std::multimap

    7. std::set and std::multiset

    8. std::unordered_map and std::unordered_multimap

    9. Other Data Structures

    10. Summary

  11. Chapter 11 Optimize I/O

    1. A Recipe for Reading Files

    2. Writing Files

    3. Reading from std::cin and Writing to std::cout

    4. Summary

  12. Chapter 12 Optimize Concurrency

    1. Concurrency Refresher

    2. C++ Concurrency Facilities Refresher

    3. Optimize Threaded C++ Programs

    4. Make Synchronization More Efficient

    5. Concurrency Libraries

    6. Summary

  13. Chapter 13 Optimize Memory Management

    1. C++ Memory Management API Refresher

    2. High-Performance Memory Managers

    3. Provide Class-Specific Memory Managers

    4. Provide Custom Standard Library Allocators

    5. Summary