Efficient C++ Performance Programming Techniques
基本信息
- 云盘路径:
/田浩然上传的资料/电子书/C_C++/[计算机科学经典着作].Addison.Wesley.Efficient.C++.Performance.Programming.Techniques.pdf - 文件大小: 1.7M
- 作者/机构: Efficient C++ Performance Programming Techniques
- 处理方式: pdf-inspector 文本提取
- 消化状态: 已完成
核心内容
Efficient C++ Performance Programming Techniques
By Dov Bulka, David Mayhew Publisher : Addison Wesley Pub Date : November 03, 1999 ISBN : 0-201-37950-3 Table of Contents Pages : 336
Far too many programmers and software designers consider efficient C++ to be an Loxymoron. They regard C++ as inherently slow and inappropriate for performance-Fcritical applications. Consequently, C++ has had little success penetrating domains such Mas networking, operating system kernels, device drivers, and others.
Efficient C++ explodes that myth. Written by two authors with first-hand experience Awringing the last ounce of performance from commercial C++ applications, this book Edemonstrates the potential of C++ to produce highly efficient programs. The book reveals Tpractical, everyday object-oriented design principles and C++ coding techniques that can yield large performance improvements. It points out common pitfalls in both design and code that generate hidden operating costs.
This book focuses on combining C++‘s power and flexibility with high performance and scalability, resulting in the best of both worlds. Specific topics include temporary objects, memory management, templates, inheritance, virtual functions, inlining, reference-Y counting, STL, and much more.
With this book, you will have a valuable compendium of the best performance techniques at your fingertips.
Team-Fly®
Table of Content
Table of Content… i
Copyright… v
Dedication… vi
Preface…vi Introduction… viii Roots of Software Inefficiency… viii Our Goal… xi Software Efficiency: Does It Matter?… xi Terminology… xii Organization of This Book… xiii Chapter 1. The Tracing War Story… 1 Our Initial Trace Implementation… 2 Key Points… 7 Chapter 2. Constructors and Destructors… 9 Inheritance… 9 Composition… 18 Lazy Construction… 19 Redundant Construction… 21 Key Points… 25 Chapter 3. Virtual Functions… 26 Virtual Function Mechanics… 26 Templates and Inheritance… 28 Key Points… 31 Chapter 4. The Return Value Optimization… 32 The Mechanics of Return-by-Value… 32 The Return Value Optimization… 33 Computational Constructors… 35 Key Points… 36 Chapter 5. Temporaries… 37 Object Definition… 37 Type Mismatch… 38 Pass by Value… 40 Return by Value… 40 Eliminate Temporaries with op=()… 42 Key Points… 43 Chapter 6. Single-Threaded Memory Pooling… 44 Version 0: The Global new() and delete()… 44 Version 1: Specialized Rational Memory Manager… 45 Version 2: Fixed-Size Object Memory Pool… 49 Version 3: Single-Threaded Variable-Size Memory Manager… 52 Key Points… 58 Chapter 7. Multithreaded Memory Pooling… 59 Version 4: Implementation… 59 Version 5: Faster Locking… 61 Key Points… 64 Chapter 8. Inlining Basics… 66 What Is Inlining?… 66 Method Invocation Costs… 69 Why Inline?… 72 Inlining Details… 73 Inlining Virtual Methods… 73 Performance Gains from Inlining… 74
ii
Key Points… 75 Chapter 9. Inlining—Performance Considerations. … (内容较长已截断) …