~/talk

Data Storage in Entity Component Systems

Talkat Meeting C++ 2023 · 2023-11-12..11-14· [frontend-architecture]
slides:none on file

Claims that reorganizing game data into struct-of-arrays memory layouts and using a simple dense-storage pattern with swap-delete with indirection yields much smaller memory bandwidth waste and big speed gains; microbenchmarks on QuickBench show a modest ~10–20% boost for tiny structs but grow to 2–4x speedup as unrelated per-entity padding increases. Implementation notes name Unity, entt and FleX as examples, describe two or three parallel vectors plus an ID lookup, and report that the approach works and keeps iteration fast while retaining constant-time inserts and deletes.

AI-written summary · about

  1. 0:00Introduction to ECS
  2. 0:18Industry trends and speaker
  3. 1:42Speaker background and goals
  4. 3:28Data-oriented design overview
  5. 4:06CPU speed and memory constraints
  6. 6:46Memory latency explained
  7. 11:08Data locality and caching
  8. 15:17Principles of data-oriented design
  9. 18:19Array of structs vs struct of arrays
  10. 26:12Cache optimization and threading
  11. 28:21Benchmarks and code architecture
  12. 30:50Decoupling data for thread safety
  13. 32:44Scalability and performance gains
  14. 35:11Defining Entity Component Systems
  15. 38:54Implementing ECS data structures
  16. 44:23Dense array swap technique
  17. 52:46Lookup tables and ID reuse
  18. 55:11ECS limitations and conclusion
  19. 59:16Q&A: Hierarchy and maps
~/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.