You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It might be useful/fun to allow certain components to be stored per archetype in ways other than a flat array. For example, a bool component might be stored in a packed bitfield, and a bool component which is nearly always false might benefit from sparse encoding. This could be pursued with something like:
This preserves the "It Just Works" behavior for typical cases, while allowing specialized implementations as needed. The proposed definition of Array would break up the currently monolithic Archetype allocations; in the event that this compromises performance, an allocator abstraction could be introduced to allow multiple containers to share a single memory region.
The most obviously useful nonstandard container, a bitfield, would require container-specific smart pointer types in place of references. This will be difficult to accomplish without GATs, so it's probably best to wait their arrival before developing this concept further.
The text was updated successfully, but these errors were encountered:
It might be useful/fun to allow certain components to be stored per archetype in ways other than a flat array. For example, a
bool
component might be stored in a packed bitfield, and abool
component which is nearly alwaysfalse
might benefit from sparse encoding. This could be pursued with something like:This preserves the "It Just Works" behavior for typical cases, while allowing specialized implementations as needed. The proposed definition of
Array
would break up the currently monolithicArchetype
allocations; in the event that this compromises performance, an allocator abstraction could be introduced to allow multiple containers to share a single memory region.The most obviously useful nonstandard container, a bitfield, would require container-specific smart pointer types in place of references. This will be difficult to accomplish without GATs, so it's probably best to wait their arrival before developing this concept further.
The text was updated successfully, but these errors were encountered: