~/talk

Writing Allocation Free Code in C#

Talkat NDC Oslo 2019 · 2019-06-17..06-21· [c-sharp, web-performance]
slides:none on file

Explains concrete C# features and measurements that cut GC pauses: shows how ref returns/ref locals and ref readonly/in stop needless copies, how readonly and ref structs prevent defensive copies, and how Span<T>/Memory<T> enable slicing contiguous memory without allocations. Demonstrates unit tests that record zero allocations and cites System.Text.Json using spans to make JSON deserialization roughly two times faster in some benchmarks. Emphasizes these are micro‑optimizations for hot paths and requires profiling before applying.

AI-written summary · about

  1. 0:00Introduction
  2. 2:25Garbage Collection
  3. 6:11LowHanging Fruit
  4. 9:23Reference Types and Value Types
  5. 12:53Closures and Iterators
  6. 18:38Value Types
  7. 22:05Ref Returns
  8. 28:48Ref ReadOnly
  9. 33:38Method Argument Modifier
  10. 36:43ReadOnly struct
  11. 46:48Ref structs
  12. 51:28SystemTextJason
  13. 53:28Micro Benchmarks
  14. 57:51Summary
~/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.