add more to performance section in ecs post
This commit is contained in:
parent
004a1694ae
commit
e23647bb5e
1 changed files with 12 additions and 2 deletions
|
@ -123,9 +123,19 @@ While these aren't *really* a separate concept from regular components, they're
|
|||
|
||||
### Performance
|
||||
|
||||
One thing that I've deliberately not mentioned until now: ECS is usually *very* fast. I often see this touted as one of the main selling points of ECS. It's true that the performance is important to an application which is running anywhere from 60-144 times per second but I think there are *many* other benefits worth talking about.
|
||||
One thing that I've deliberately not mentioned until now: ECS is generally fast. I often see this touted as one of the main selling points of ECS. It's true that the performance is important to an application which is running anywhere from 60-144 times per second but I think there are *many* other benefits worth talking about.
|
||||
|
||||
Most of the performance benefits of ECS are due to its overlap with data-oriented design concepts. One example of data-oriented design, parallel arrays, is a common implementation in many ECS frameworks. I'm *especially* not qualified to speak on this issue because I've very little exposure to the concept separate from using it via ECS in game development, so I'll let others explain it.
|
||||
Most of the performance benefits of ECS are due to its overlap with data-oriented design concepts. One example of data-oriented design, parallel arrays, is a common implementation in many frameworks. I'm *especially* not qualified to speak on this issue because I've very little exposure to the concept separate from using it in game development, so I'll let someone else explain it.
|
||||
|
||||
> # Is ECS fast?
|
||||
>
|
||||
> Generally yes, though this of course depends on what is being measured, and the ECS implementation. Different implementations make different tradeoffs, and as such an operation that is really fast in one framework is quite slow in another.
|
||||
>
|
||||
> Things that ECS implementations are generally good at are querying and iterating sets of entities linearly, or dynamically changing components at runtime. Things that ECS implementations are generally not good at are queries or operations that require highly specialized data structures, such as binary trees or spatial structures. Knowing the tradeoffs of an implementation and levering its design ensure you get the most performance out of an ECS.
|
||||
>
|
||||
> -- <cite>[Sander Mertens](https://github.com/SanderMertens/ecs-faq?tab=readme-ov-file#is-ecs-fast)</cite>
|
||||
|
||||
If you want to know more about *why* it's fast, read Sander's article about [how to build ECS](https://ajmmertens.medium.com/building-an-ecs-2-archetypes-and-vectorization-fe21690805f9).
|
||||
|
||||
## Theseus' Shield
|
||||
|
||||
|
|
Loading…
Reference in a new issue