Turbocharged: Writing High-performance C# and .NET code
summary
Shows concrete wins: microbenchmarks with Benchmark.NET drop a key-builder from ~1000 ns to ~400 ns and cut allocations ~6x, saving roughly 17 GB/day on an 18M‑message service; CSV ingest drops from 8.5 s to <1 s and allocations from 7.2 GB to 242 MB (30x), using pipelines and span parsing; JSON happy path short‑circuits to ~485 ns with near‑zero allocations using low‑level UTF‑8 reader. Uses Span<T> with stackalloc under 256 chars, rents via ArrayPool, and opts into System.Text.Json for low‑allocation parsing.
AI-written summary · about
chapters (15)
- 0:00Introduction
- 1:21What we will cover
- 2:18Aspects of performance
- 11:46Benchmark.NET
- 16:36Span of T
- 29:35Memory of T
- 31:00Practical Example: Key Builder
- 36:50Array Pool
- 39:14Pipelines
- 41:52Practical Example: CSV File Parsing
- 46:19System.Text.Json
- 47:59Practical Example: JSON Parsing
- 55:03Business Buy-In
- 59:12Summary
- 1:01:41Q&A
related talks
01h 01mTurbocharged: Writing High-Performance C# and .NET Code
01h 04mTurbocharged: Writing High-Performance C# and .NET Code
47mUnlocking Performance Improvements in .NET
56mState of the .NET Performance
59mHigh-performance code design patterns in C#
37mRock Your Code Code and App Performance for Microsoft .Net
52mPerformance features in C#
59mPerformance tricks I learned from contributing to open source .NET packages
