Hacker News new | ask | show | jobs
by GenericCanadian 895 days ago
In a naive ECS system this might be true, but mature ECS systems use archetypes which partition based on usage to maintain the contiguous memory.

I've written about the details here: https://taintedcoders.com/bevy/archetypes/

The gist is that instead of partitioning by type you sub partition by usage. Bevy does this by optimizing your storage based on the bundles (groups of components) you create. Flecs does the same but I'm not sure of the exact mechanism.