Algorithms line

Performance Tuning

Profiling & benchmarking, allocations & GC, database and I/O tuning, caching, async and throughput

4 sections

Start: Database & I/O Tuning

Mid-level 2

  1. Database & I/O TuningIn almost every business application the database is the bottleneck, and the top three causes are always the same: N+1 queries, a missing index, and fetching far more data than the operation needs. All three are invisible in the C#…, not read
  2. Profiling & BenchmarkingProfiling tells you where time goes in a real workload; benchmarking tells you which of two implementations is faster under controlled conditions. They answer different questions and are not interchangeable. The practical skills are…, not read

Senior 2

  1. Allocations & Garbage CollectionIn .NET, allocation itself is cheap — a pointer bump. What costs is collection, and collection cost is driven by how many objects survive, not by how many you created. That single inversion explains almost everything: short-lived…, not read
  2. Caching, Async & ThroughputCaching is the highest-leverage optimisation available and the one most likely to introduce correctness bugs, because it trades freshness for speed and the bug shows up as "a user saw stale data", not as an exception. Async is the…, not read