Ukendio / jecs

A fast, portable Entity Component System for Luau
https://ukendio.github.io/jecs/
MIT License
146 stars 26 forks source link

Move assertion up #9

Closed Ukendio closed 6 months ago

Ukendio commented 6 months ago

fall case to the else statement didn't properly check that the archetypes aren't the same, making insertions quite slow. Now instead the assertion is moved up and checks it first, in the case that it is not the same archetypes then just set component data directly and return early.