SIECS Archetype Storage
This page summarizes the SIECS-specific runtime model.
Tables
Section titled “Tables”Each structural type maps to a table.
A table stores:
- an entity handle array;
- data columns for data-bearing components;
- structural type metadata;
- transition edges;
- query/cache metadata used by the runtime.
Tags affect table identity without requiring a payload column.
Columns
Section titled “Columns”Data-bearing components are stored column-wise.
A query can therefore expose a contiguous Position*, Velocity*, or other
field for the current batch.
Packed rows
Section titled “Packed rows”Rows are kept packed.
When a non-final row is removed, the final row can be moved into the vacant slot. Entity records are updated so handle-to-row lookup remains correct.
Do not treat table row numbers as stable entity identifiers.
Growth
Section titled “Growth”When table capacity grows, entity arrays and data columns may reallocate.
SIECS refreshes query field metadata when table storage moves.
User component pointers remain borrowed and should not be retained across operations that can grow/migrate storage.
Structural transitions
Section titled “Structural transitions”Adding/removing components or structural relation state computes a destination type/table and migrates the entity.
Transition metadata is cached so repeated structural edges do not need to reconstruct the entire lookup path from scratch.
Query cache
Section titled “Query cache”Persistent query ids store matching table information.
When a new table is created, active query caches are updated.
This is the central reason repeated query/system iteration can start from prematched tables rather than scanning every entity.

