~/talk

Lowering in C#: What's really going on in your code?

Talkat NDC London 2020 · 2020-01-27..01-31· [javascript]
slides:none on file

Explains how C# lowering rewrites high‑level code into concrete mechanics: foreach becomes a scoped while that introduces two casts and calls getEnumerator called once, lambdas get tiny helper classes with closure hoisting of locals, and yield/async become state‑machine classes whose MoveNext drives execution. Shows concrete performance impacts (extra allocations, surprising lifetime retention), points to Roslyn source and SharpLab as tools to inspect generated code and verify whether the lowered code performs or allocates as expected.

AI-written summary · about

  1. 0:00Intro
  2. 0:31What is lowering
  3. 3:51Linked queries
  4. 4:56Variables
  5. 7:17Performance
  6. 9:44Understanding how things work
  7. 10:05For each loop
  8. 20:15lambdas
  9. 25:30closing over
  10. 26:42yield
  11. 28:07helper
  12. 28:46numerator
  13. 29:55movenext
  14. 39:52SharpLab
~/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.