~/talk

Turbocharged: Writing High-Performance C# and .NET Code

Talkat NDC Porto 2024 · 2024-10-14..10-18· [dotnet]
slides:none on file

Covers concrete techniques and measured wins: uses Span<T> slicing and System.Memory to avoid copies, ArrayPool rent/return for temporary buffers, System.IO.Pipelines with ReadOnlySequence for streaming, and low‑level System.Text.Json UTF8 reader for early exit. Benchmarks use BenchmarkDotNet and profilers. Example results: object key builder becomes ~26% faster and cuts allocations 74%, a pipeline rewrite runs ~81% faster and reduces allocations 97%, and a JSON fast path returns in ~200 ns with zero allocations; a real service saves ~10 GB/day on 18 million messages.

AI-written summary · about

  1. 0:00Welcome and introduction
  2. 1:10Performance goals and trade-offs
  3. 6:27Optimization cycle and measurement
  4. 9:35Tools for measuring performance
  5. 13:25Benchmarking with BenchmarkDotNet
  6. 19:01Introducing Span<T>
  7. 24:58Optimizing with Span<T>
  8. 35:54Memory<T> role
  9. 36:15Optimizing string processing
  10. 43:14ArrayPool for allocations
  11. 47:07System.IO.Pipelines
  12. 51:56File parsing with pipelines
  13. 55:03High-performance JSON parsing
  14. 59:39JSON parsing demo
  15. 1:01:01Turning optimizations into value
~/search
type to search 6,249 conferences, 138,987 speakers and 185,172 talks
~/help
cmdctrl k
search every conference, speaker and series
/
focus the filter search
h
home
c
conferences
s
speakers
e
series
t
light / dark — the status bar button does the same
?
this help
esc
close this, then clear every filter — or just the search, while you are typing in it

Ignored while you are typing. Pages without a filter rail have no search to focus.