~/talk

Performance Improvements in .NET 6

Talkat DotNext 2021 Moscow · 2021-10-21..10-22· [dotnet]
slides:none on file

Hundreds of targeted fixes make .NET 6 noticeably faster: cancellation registration costs drop from ~150 ns/400 B in older releases to ~half the time and half the allocation by .NET 6; a pathological thread‑pool case falls from ~35 s to ~1 s by being aggressive about injecting threads; Random.NextBytes goes from ~70 µs to ~1 µs (≈70×); GUID parse hits ~30 ns; string interpolation becomes zero‑alloc with ~40 ns vs 160 ns previously; file I/O is truly async and doubles throughput while eliminating allocations; array pool cliff removed; overall thread‑pool blocking fixed and many vectorized hotspots are accelerated.

AI-written summary · about

  1. 0:00Introduction to .NET 6 performance
  2. 7:14Revisiting past assumptions in threading
  3. 17:50Caching all the things in async
  4. 22:52Optimizing system libraries
  5. 33:06Vectorizing hot paths
  6. 38:02Special casing common inputs
  7. 41:38Removing array pool cliff
  8. 44:26Making async IO actually async
  9. 47:19Stopping unnecessary work in networking
  10. 49:07Making new faster
  11. 50:14Faster reflection with defensive copies
  12. 51:59Optimizing LINQ operations
  13. 54:27Stopping being lazy in crypto
  14. 56:36Building at compile time
  15. 58:44Summary and next steps
~/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.