~/talk

C# Performance - Demons, Wizards, Warriors, Auditors

Talkat ACCU 2024 · 2024-04-17..04-20· [c-sharp]
links:none on file
slides:none on file

Shows a concrete pitfall: using a default struct for 10,000 color values leads to 50 million equals calls and timings jumping from ~15 ms to ~500 ms due to poor default GetHashCode, padding and boxing. Replacing with an explicit GetHashCode plus IEquatable<T> collapses the cost; record structs also perform well. Measurement uses JetBrains profiler (tracing) to find hotspots and BenchmarkDotNet for accurate timings; lesson: measure, then fix the hash/equality and boxing.

AI-written summary · about

  1. 0:00Introduction and motivation
  2. 6:12C# type system fundamentals
  3. 12:25Garbage collection and structs
  4. 16:43Equality, boxing, and strings
  5. 26:26Hash sets and performance
  6. 35:07Optimizing hash implementations
  7. 47:50Advanced C# types and benchmarks
  8. 53:36Benchmarking C# and C++
  9. 1:06:50Conclusion and resources
  10. 1:10:30Q&A session
~/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.