Optimized C++

Proven Techniques for Heightened Performance

Paperback Engels 2016 1e druk 9781491922064
Verwachte levertijd ongeveer 16 werkdagen

Samenvatting

In today’s fast and competitive world, a program’s performance is just as important to customers as the features it provides. This practical guide teaches developers performance-tuning principles that enable optimization in C++. You’ll learn how to make code that already embodies best practices of C++ design run faster and consume fewer resources on any computer—whether it’s a watch, phone, workstation, supercomputer, or globe-spanning network of servers.

Author Kurt Guntheroth provides several running examples that demonstrate how to apply these principles incrementally to improve existing code so it meets customer requirements for responsiveness and throughput. The advice in this book will prove itself the first time you hear a colleague exclaim, “Wow, that was fast. Who fixed something?”

- Locate performance hot spots using the profiler and software timers
- Learn to perform repeatable experiments to measure performance of code changes
- Optimize use of dynamically allocated variables
- Improve performance of hot loops and functions
- Speed up string handling functions
- Recognize efficient algorithms and optimization patterns
- Learn the strengths—and weaknesses—of C++ container classes
- View searching and sorting through an optimizer’s eye
- Make efficient use of C++ streaming I/O functions
- Use C++ thread-based concurrency features effectively

Specificaties

ISBN13:9781491922064
Taal:Engels
Bindwijze:paperback
Aantal pagina's:366
Uitgever:O'Reilly
Druk:1
Verschijningsdatum:1-1-2016

Lezersrecensies

Wees de eerste die een lezersrecensie schrijft!

Inhoudsopgave

Preface

1. An Overview of Optimization
-Optimization Is Part of Software Development
-Optimization Is Effective
-It’s OK to Optimize
-A Nanosecond Here, a Nanosecond There
-Summary of Strategies for Optimizing C++ Code
-Summary

2. Computer Behavior Affecting Optimization
-Lies C++ Believes About Computers
-The Truth About Computers
-C++ Tells Lies Too
-Summary

3. Measure Performance
-The Optimizing Mindset
-Perform Experiments
-Profile Program Execution
-Time Long-Running Code
-Estimate Code Cost to Find Hot Code
-Other Ways to Find Hot Spots
-Summary

4. Optimize String Use: A Case Study
-Why Strings Are a Problem
-First Attempt at Optimizing Strings
-Second Attempt at Optimizing Strings
-Eliminate String Conversion
-Summary

5. Optimize Algorithms
-Time Cost of Algorithms
-Toolkit to Optimize Searching and Sorting
-Efficient Search Algorithms
-Efficient Sort Algorithms
-Optimization Patterns
-Summary

6. Optimize Dynamically Allocated Variables
-C++ Variables Refresher
-C++ Dynamic Variable API Refresher
-Reduce Use of Dynamic Variables
-Reduce Reallocation of Dynamic Variables
-Eliminate Unneeded Copying
-Implement Move Semantics
-Flatten Data Structures
-Summary

7. Optimize Hot Statements
-Remove Code from Loops
-Remove Code from Functions
-Optimize Expressions
-Optimize Control Flow Idioms
-Summary

8. Use Better Libraries
-Optimize Standard Library Use
-Optimize Existing Libraries
-Design Optimized Libraries
-Summary

9. Optimize Searching and Sorting
-Key/Value Tables Using std::map and std::string
-Toolkit to Improve Search Performance
-Optimize Search Using std::map
-Optimize Search Using the <algorithm> Header
-Optimize Search in Hashed Key/Value Tables
-Stepanov’s Abstraction Penalty
-Optimize Sorting with the C++ Standard Library
-Summary

10. Optimize Data Structures
-Get to Know the Standard Library Containers
-std::vector and std::string
-std::deque
-std::list
-std::forward_list
-std::map and std::multimap
-std::set and std::multiset
-std::unordered_map and std::unordered_multimap
-Other Data Structures
-Summary

11. Optimize I/O
-A Recipe for Reading Files
-Writing Files
-Reading from std::cin and Writing to std::cout
-Summary

12. Optimize Concurrency
-Concurrency Refresher
-C++ Concurrency Facilities Refresher
-Optimize Threaded C++ Programs
-Make Synchronization More Efficient
-Concurrency Libraries
-Summary

13. Optimize Memory Management
-C++ Memory Management API Refresher
-High-Performance Memory Managers
-Provide Class-Specific Memory Managers
-Provide Custom Standard Library Allocators
-Summary

Index

Managementboek Top 100

Rubrieken

    Personen

      Trefwoorden

        Optimized C++