Skip to content

Further optimization of PackedColumnStorage when get entities_with_components? #193

@vrecluse

Description

@vrecluse

Is optimization like this possible?

auto& column = getSmallestSizeColumn<Components...>();
for (auto& component in column)
{
   auto entity = getEntity(component)
   if (entity.Contains<Components...>()) { f(entity, cs...); }
}

When finding entities_with_components, iterate over the smallest size column to find entities instead of iterate all entities should get performance benefits when some components rarely exist.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions