Rock Your Code: Code & App Performance for Microsoft .NET
summary
Compares .NET 6 vs .NET 8 microbenchmarks and real incidents: .NET 8 shows widespread speedups, regex precompiled/SourceGenerator patterns hit 21× faster with zero allocations, a regex Source Generator pattern reaches 36× faster, logger Source Generator is 11× faster, StringBuilder pooling beats + concatenation and yields ~21× faster than +=, RandomNumberGenerator is ~8× faster than Random for byte arrays, Exists is ~4× faster than Any, TryGetValue with Ordinal is fastest for dictionaries, and a 200 GB in‑memory catalog causing spikes to 50,000 TPS is resolved to enable cloud migration.
AI-written summary · about
chapters (16)
- 0:00Welcome
- 3:19Speaker and focus
- 5:53Code performance goals
- 9:46Cleaner faster code
- 12:34String handling in .NET
- 23:17Collections performance
- 31:59LINQ performance
- 36:01Source generators
- 40:59Logging with generators
- 43:11Regex with generators
- 45:56Data validation impact
- 47:43Interpolated strings pitfalls
- 51:47Performance in .NET 8
- 53:14Editor config settings
- 55:46Benchmarking code
- 56:51Related shows
related talks
37mRock Your Code Code and App Performance for Microsoft .Net
47mUnlocking Performance Improvements in .NET
46mHigh Performance .NET
01h 03mTurbocharged: Writing High-Performance C# and .NET Code
01h 06mGet Better App Performance with this One Weird Trick
44m.NET Performance Investigation
01h 02mPerformance tricks I learned from contributing to the Azure .NET SDK
48mPerformance in the .NET Runtime
