C++性能最佳化手冊(影印版英文版)

C++性能最佳化手冊(影印版英文版)

《C++性能最佳化手冊(影印版英文版)》是2017年2月1日東南大學出版社出版的圖書,由Kurt,Guntheroth 編寫。

基本介紹

  • 中文名:C++性能最佳化手冊(影印版英文版)
  • 作者:Kurt,Guntheroth
  • 出版時間:2017年2月1日
  • 出版社:東南大學出版社 
  • ISBN:9787564169992
內容簡介,圖書目錄,

內容簡介

 在當今飛速發展和充滿競爭的世界中,對於客戶而言,程式的性能與功能一樣重要。這本實踐指南為開發人員講解在C++中實現最佳化的性能調優原則。你將學習如何令已經包含了C++設計實踐的代碼在任何計算機上——無論是手錶、電話、工作站、超級計算機還是全球伺服器網路——很快地運行並消耗少的資源。
  作者提供了幾個運行示例,演示如何逐步套用這些原則以改進現有代碼,從而滿足客戶對回響速度和數據吞吐量的要求。

圖書目錄

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
Use a Better Compiler, Use Your Compiler Better
Use Better Algorithms
Use Better Libraries
Reduce Memory Allocation and Copying
Remove Computation
Use Better Data Structures
Increase Concurrency
Optimize Memory Management
Summary
2. Computer Behavior Affecting Optimization
Lies C++ Believes About Computers
The Truth About Computers
Memory Is Slow
Memory Is Not Accessed in Bytes
Some Memory Accesses Are Slower than Others
Memory Words Have a Big End and a Little End
Memory Has Finite Capacity
Instruction Execution Is Slow
Making Decisions Is Hard for Computers
There Are Multiple Streams of Program Execution
Calling into the Operating System Is Expensive
C++ Tells Lies Too
All Statements Are Not Equally Expensive
Statements Are Not Executed in Order
Summary
3. Measure Performance
The Optimizing Mindset
Performance Must Be Measured
Optimizers Are Big Game Hunters
The 90/10 Rule
Amdahl's Law
Perform Experiments
Keep a Lab Notebook
Measure Baseline Performance and Set Goals
You Can Improve Only What You Measure
Profile Program Execution
Time Long-Running Code
“~ Little Learning” About Measuring Time
Measuring Time with Computers
Overcoming Measurement Obstacles
Create a Stopwatch Class
Time Hot Functions in a Test Harness
Estimate Code Cost to Find Hot Code
Estimate the Cost of Individual C++ Statements
Estimate the Cost of Loops
Other Ways to Find Hot Spots
Summary
4. Optimize String Use: A Case Study
Why Strings Are a Problem
Strings Are Dynamically Allocated
Strings Are Values
Strings Do a Lot of Copying
First Attempt at Optimizing Strings
Use Mutating String Operations to Eliminate Temporaries
Reduce Reallocation by Reserving Storage
Eliminate Copying of String Arguments
Eliminate Pointer Dereference Using Iterators
Eliminate Copying of Returned String Values
Use Character Arrays Instead of Strings
……
5. Optimize Algorithms
6. Optimize Dynamically Allocated Variables
7. Optimize Hot Statements
8. Use Better Libraries
9. Optimize Searching and Sorting
10. Optimize Data Structures
11. Optimize I/0
12. Optimize Concurrency
13. Optimize Memory Management

相關詞條

熱門詞條

聯絡我們