evaera / matter

A modern ECS library for Roblox.
https://eryn.io/matter/
MIT License
144 stars 34 forks source link

Archetype negation #93

Closed Ukendio closed 8 months ago

Ukendio commented 8 months ago

Addresses #91 but depends on #90 before this is implementable.

In every case performs better than existing queries. Scales relatively to how many entities you filter from :without image image

Benchmark file: https://drive.google.com/file/d/1JJbPvVdSCS0kRd6HgMQ2bGEhDmhk1kmy/view?usp=sharing

Passes every unit test currently, but waiting to hear feedback from others to test it in real production code.

memorycode commented 8 months ago

These changes caused the system with this query to go from 25μs -> 5μs. There are about 75 entities with Components.A and Components.B:

world:query(Components.A, Components.B):without(Components.C)
Ukendio commented 8 months ago

Moved to https://github.com/matter-ecs/matter/pull/4