Skip to content

refactor: make the system's entities container a contiguous block of memory #165

@iMeaNz

Description

@iMeaNz

Objective

For now the entites in the systems are stored inside a std::set, this is not really efficient since std::set is not stored as contiguous block of memory like std::vector or std::array, and then it is not really cache-friendly.
We should change that, at first we tried std::vector but the search/reallocation cost makes so that adding/removing components or deleting entites is very inneficient.
We should try to implement our own container class with a cache-friendly and O(1) lookup implementation but also allowing fast search and allocation.

Acceptance Criteria

  • 1. Implement a new container class
  • 2. Add it to the system class

Dependencies

No response

Technical Details

No response

Type

Engine

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

Projects

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions