-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Description
Right now with how arrays are implemented for entities, if there are 20 entities with a char array, thats 20 unique array instances (allocations).
This issue is for refactoring how they're stored so that a single giant buffer is created for each array type. And when an array is created on an entity, a region from the buffer is consumed. Letting those 20 entities still have their own array, but the underlying allocation is a single one.
This gives them these qualities:
- arrays could be acessed more efficiently
- significantly less memory fragmentation
- slower to modify length
Some more details on the refactor:
- arrays will behave like lists
- when capacity needs to increase, other regions will be shifted
- maybe new constructs to contain arrays, because their region within the buffer may change as its passed around
- the type used for accessing the array will likely be a ref struct
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels