-
-
Notifications
You must be signed in to change notification settings - Fork 4.3k
Closed
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-PerformanceA change motivated by improving speed, memory usage or compile timesA change motivated by improving speed, memory usage or compile times
Description
What problem does this solve or what need does it fill?
I'm trying to get components data from EntityIds(Vec<Entity>) with world.get(entity).... I'm experience some "unexpected" performance drop (in compare to Vec<Rc>).
Looking at the code of World::get<T: Component>(&self, entity: Entity) ... there is so much indirection... Getting component index from hashmap, then bursting through 3 indirections to get component "Column", and one branch between storage type.
What solution would you like?
Is it possible to somehow .... prefetch/cache that archetype table_row/column?
That's just too much... Thats waaaay slower then just cache misses with Rc.
Additional context
I use Vec<Entity> not that often... But sometimes you just have to use it ....
FeldrinH, schneiderfelipe, seivan and andrewzhurov
Metadata
Metadata
Assignees
Labels
A-ECSEntities, components, systems, and eventsEntities, components, systems, and eventsC-PerformanceA change motivated by improving speed, memory usage or compile timesA change motivated by improving speed, memory usage or compile times