{"repo":"SergeyMakeev/SlotMap","free":true,"listed":false,"github":"https://github.com/SergeyMakeev/SlotMap","clone":"git clone https://github.com/SergeyMakeev/SlotMap.git","description":"A slot map is a high-performance associative container with persistent unique 32/64 bit keys to access stored values.","language":"C++","stars":337,"topics":["associative-array","associative-map","data-oriented-architecture","data-oriented-design","dod","ecs","gamedev","handles","performance","persistence"],"license":"MIT","category":"game-templates","readme_excerpt":"Slot Map A Slot Map is a high-performance associative container with persistent unique keys to access stored values. It's designed for performance-critical applications where stable references, O(1) operations, and memory efficiency are essential. Table of Contents - What is a Slot Map? - Key Features - Quick Start - Building - API Reference - Key Types - Advanced Features - Performance - Implementation Details - Thread Safety - Examples - References What is a Slot Map? A Slot Map solves the problem of storing collections of objects that need stable, safe references but have no clear ownership hierarchy. Unlike std::unordered map where you provide keys, a slot map generates unique keys when you insert values. Key differences from std::unordered map : - Slot map generates keys for you (no key collisions) - Guaranteed O(1) insertion, removal, and access - Memory-stable pointers (values never move in memory) - Automatic key invalidation when items are removed - Efficient memory layout with page-based allocation Perfect for: - Game entities and component systems - Resource management (textures, sounds, etc.) - Object pools and handle-based systems - Any scenario requiring safe, stable references Key Features - O(1) Performance : Insertion, removal, and access are all O(1) in best, worst, and average case - Memory Stability : Pointers to values remain valid until explicitly removed - Safe References : Keys automatically become invalid when items are removed - Memory Efficient : Pa","default_branch":null,"files":null,"tree":[],"storefront":"/r/SergeyMakeev","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/SergeyMakeev/SlotMap/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}