~/talk

What the game industry taught me about performance

Talkat Øredev 2019 · 2019-11-06..11-08· [devops-and-delivery]
slides:none on file

Shows concrete, measurable techniques: uses BenchmarkDotNet on .NET Core 3.0, demonstrates cache-aware vs cache-unfriendly matrix loops (row wins), converts class-of-objects to compact arrays for a 7× speedup, applies SIMD via System.Numerics.Vector for up to 10× gains, replaces branches with sorting or bit tricks to avoid a 5× variance, and diagnoses parallel slowdown from false sharing, then fixes it with thread-local accumulation to regain near-linear scaling.

AI-written summary · about

  1. 0:00Intro
  2. 1:52Why Care About Performance (again)?
  3. 4:15Executing Code - Fetch and Decode
  4. 4:27Executing Code - Process Instruction
  5. 4:38Keeping the CPU Busy - Pipelining
  6. 5:16Speculative Execution and Branching
  7. 5:52Incorrect Prediction
  8. 6:33Making Storage Faster by Caching
  9. 7:03Read Cache Line
  10. 7:31Populate Cache
  11. 7:50Multiple Caches and Multiple Copies of Data
  12. 8:11Writing Shared Data
  13. 8:30Cache Coherence
  14. 8:50Examples
  15. 9:47What About Garbage Collection?
  16. 10:40Traverse by Column
  17. 10:50Behind the Scene
  18. 11:27Benchmark: Row vs. Column
  19. 11:54The Profiler Hides the Truth
  20. 12:35Let's Blame the Compiler Then
  21. 15:11Indirection of Reference Types
  22. 16:00Benchmark: Classes vs. Structs
  23. 16:19Cache Pollution
  24. 16:43What Do We Need?
  25. 17:25Benchmark: Dedicated Arrays
  26. 18:10Setup
  27. 19:30Branch Prediction in a Nutshell
  28. 21:17Bonus Round: SIMD
  29. 21:55SIMD Implementation
  30. 23:29Perfect Parallelism
  31. 24:15Baseline: Simple Loop
  32. 24:29Let's Make it Parallel
  33. 24:54First attempt - Parallel.For
  34. 25:09Benchmark: Parallel.For
  35. 26:05Benchmark: Locking
  36. 26:38Lock Free - Dedicated Storage for each Result
  37. 27:21Benchmark: Lock Free
  38. 28:26Local Storage - Stack Variable
  39. 29:05Benchmark: Local Storage
  40. 30:04Performance is a Feature
  41. 31:20Keep Learning
  42. 31:55Summary and Thank You!
~/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.