Why Should You Choose Managed Code?
Is Managed Code Slower Than Native Code?
Work With the CLR, Not Against It
Chapter 1 Performance Measurement and Tools
Reduce References between Objects
Avoid Large Object Allocations
Pool Long-Lived and Large Objects
Reduce Large Object Heap Fragmentation
Force Full GCs in Some Circumstances
Compact the Large Object Heap On-Demand
Get Notified of Collections Before They Happen
Use Weak References for Caching
Measuring and Investigating GC Performance
Optimizing JITting with Profiling
Chapter 4 Asynchronous Programming
Use Tasks for Non-Blocking I/O
Ensure Good Startup Thread Pool Size
Do Not Change Thread Priorities
Thread Synchronization and Locks
Chapter 5 General Coding and Class Design
Override Equals and GetHashCode for Structs
Virtual Methods and Sealed Classes
Chapter 6 Using the .NET Framework
Multiple APIs for the Same Thing
Avoid APIs that Throw Exceptions under Normal Circumstances
Avoid APIs That Allocate From the Large Object Heap
The Surprisingly High Cost of Enum
Optimize HTTP Settings and Network Communication
Chapter 7 Performance Counters
Consume Custom Events in PerfView
Create a Custom ETW Event Listener
Custom PerfView Analysis Extension
Asynchronous Programming and Memory Models
Understand the Underlying OS, APIs, and Hardware
Restrict API Usage in Certain Areas of Your Code
Centralize and Abstract Performance-Sensitive and Difficult Code
Isolate Unmanaged or Unsafe Code
Prefer Code Clarity to Performance Until Proven Otherwise
Chapter 11 Building a Performance-Minded Team
Understand the Areas of Critical Performance
Performance Infrastructure and Automation
Appendix A—Kick-Start Your Application’s Performance
Analyze Asynchronous Performance
Common Algorithms and Their Complexity