Data Storage in Entity Component Systems
summary
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
chapters (19)
- 0:00Introduction to ECS
- 0:18Industry trends and speaker
- 1:42Speaker background and goals
- 3:28Data-oriented design overview
- 4:06CPU speed and memory constraints
- 6:46Memory latency explained
- 11:08Data locality and caching
- 15:17Principles of data-oriented design
- 18:19Array of structs vs struct of arrays
- 26:12Cache optimization and threading
- 28:21Benchmarks and code architecture
- 30:50Decoupling data for thread safety
- 32:44Scalability and performance gains
- 35:11Defining Entity Component Systems
- 38:54Implementing ECS data structures
- 44:23Dense array swap technique
- 52:46Lookup tables and ID reuse
- 55:11ECS limitations and conclusion
- 59:16Q&A: Hierarchy and maps
related talks
01h 21mData Oriented Design and Entity Component System Explained
43mIntroduction to Data-Oriented Design in Unity
48mImproving Data Structures for Rapid & Intelligent Gameplay Design.
40mUsing Data-Oriented Design to Build Apps Better
01h 05mImplementation of a component-based entity system in modern C++
25mDeveloping Games Using Data not Trees
51mData Orientation For The Win!
01h 04mData oriented design in practice
