Understanding ECS. The L1 and L2 cache and What makes ECS so fast?
As explained in this video . And this Wikipedia page . Data-Oriented ECS? L1 and L2 cache. this post is a continuation of the previous post , so if you haven't read it please do! Whenever we try to access and update a position component in our ECS (Entity Component System), for example, if we were using Object-Oriented techniques the entire object would get loaded into memory to just update the position. That's fine if you're not trying to make a mass-scale super Triple-A engine and all you want to do is get Georgy here to walk across the screen. In that case, ECS might be completely overkill. But if you are wanting to handle millions of Entities at once, memory efficiency becomes more important. You can see what using conventional Object-Oriented techniques might look like, and why it's inefficient below: As you can see we're loading all of Geargy and lots of components that we really don't care about. And it limits our ability to update lots of Georgy...