Performance tricks I learned from contributing to the Azure .NET SDK
summary
Contributor to the Azure .NET SDK documents over seventy pull requests that target hot-path C# code and shows concrete fixes: replace LINQ.Any with loops, remove closure allocations, rent with ArrayPool, use stackalloc + Span<byte> and BenchmarkDotNet + profilers to validate. Small changes yield measurable wins: 20–40% throughput and GC reduction for Any→loop, a 74–78% throughput lift after removing closure allocations, and 8% publish / 3–4% ingest gains in Event Hubs; changes ship after telemetry and profiling confirm them.
AI-written summary · about
chapters (12)
- 0:00Introduction and motivation
- 2:06Performance at scale
- 6:17Avoiding excessive allocations
- 10:35Optimizing LINQ-based code
- 14:52Collection-based optimizations
- 23:32Closure allocations
- 27:39Buffer pooling and reuse
- 36:58Stack allocation benefits
- 40:49Memory manipulation with Span
- 45:24Partition key algorithm case
- 55:12Summary and final tips
- 58:24Q&A and closing
related talks
01h 03mTurbocharged: Writing High-Performance C# and .NET Code
01h 03mApplication Performance Optimisation in Practice
47mUnlocking Performance Improvements in .NET
01h 02mApplication Performance Optimisation in Practice
48mPerformance in the .NET Runtime
46mHigh Performance .NET
01h 06mGet Better App Performance with this One Weird Trick
01h 00mRock Your Code: Code & App Performance for Microsoft .NET
