~/talk

Immutable Collections in NET: Why and How?

Talkat JetBrains .NET Day Online 2019 · on Thursday, 2019-05-16· [dotnet, concurrency]
slides:none on file

Argues that replacing shared mutable state with persistent structures simplifies threading, cuts implicit context and cancels, and preserves correctness using compare-and-swap loops and ImmutableInterlocked helpers. Dives into System.Collections.Immutable implementations (copy-on-write arrays, linked-list stacks, two-stack queues, rope-like immutable lists) and microbenchmarks: inserting in the middle stays fast up to 100,000 elements for immutable lists while mutable List degrades around 10k–100k, and an immutable sorted dictionary is ~2x faster than the hash-based immutable version. Notes higher GC/memory pressure.

AI-written summary · about

  1. 0:00Start
  2. 1:16Code quality maintenance
  3. 6:41Introduction to immutable collections
  4. 7:42Motivation - Why? Where can you apply immutable collections?
  5. 28:12Review well-known immutable objects
  6. 47:14Inspect internal structure and performance
~/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.