~/talk

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

Talkat NDC London 2020 · 2020-01-27..01-31· [c-sharp, dotnet]
slides:none on file

Shows concrete code changes and measured wins: uses Span<T>/Memory<T>, System.IO.Pipelines, ArrayPool and System.Text.Json with BenchmarkDotNet to prove results. Parsing a 10k-row TSV drops runtime from ~8.5s to <1s and allocations from ~7GB to ~242MB (≈30x); a message-key builder reduces allocations to 192 bytes and avoids ~2,700 Gen0 GCs across 18 million messages/day; low-level UTF-8 JSON parsing cuts work by inspecting the first 20 bytes to skip full deserialization. Demonstrations compile and benchmark.

AI-written summary · about

  1. 0:00Turbocharged: Writing High-Performance
  2. 1:33Aspects of Performance
  3. 6:36Measuring Application Performance
  4. 9:05Benchmark .NET
  5. 14:10Span - System Memory package. Built into NET Core 21.
  6. 17:20Span Slice
  7. 24:34Working with Strings
  8. 25:32Span Limitations
  9. 35:28Object Key Builder Benchmarks
  10. 40:37System.IO.Pipelines
  11. 43:15ReadOnly Sequence
  12. 47:02TSV Parsing Optimisation - Results
  13. 57:40Cost Saving Example: Input Processor This work is a small part of a much bigger potential gain
  14. 59:04Summary
~/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.