Skip to content

Commit 1c0fb42

Browse files
authored
Enhance SlotId and SlotArena for improved stability and performance (#29)
- Updated `SlotId` to include a generation counter, preventing stale handle access and ensuring safe reuse of indices. - Modified `SlotArena` to manage a separate generations vector, allowing for efficient tracking of slot reuse and enhancing the safety of `get`, `remove`, and `contains` operations. - Improved documentation to clarify the behavior of `SlotId` and its relationship with `SlotArena`, including examples demonstrating the new generation checks. - Ensured that all changes align with performance goals, maintaining O(1) complexity for access patterns while enhancing usability and safety.
1 parent 4acb207 commit 1c0fb42

1 file changed

Lines changed: 172 additions & 46 deletions

File tree

0 commit comments

Comments
 (0)