Structs are easy to envision as a repeating pattern tessellating across memory space; it makes slicing regions of data and bulk memory copy (e.g. DMA) easy.
Yet if the algorithms mostly work with subsets of those fields then a 'column database' type of data layout clearly has benefits.
Though for the complex case I would prefer more syntax sugar from the language.
A "column struct" datatype that might include tuning suggestions for stride, size, etc; but would present a simple interface for humans. Given multiple underlying blocks of records a parallalizable foreach style loop might even shard across NUMA distributed threads if supported at runtime.
Yet if the algorithms mostly work with subsets of those fields then a 'column database' type of data layout clearly has benefits.
Though for the complex case I would prefer more syntax sugar from the language.
A "column struct" datatype that might include tuning suggestions for stride, size, etc; but would present a simple interface for humans. Given multiple underlying blocks of records a parallalizable foreach style loop might even shard across NUMA distributed threads if supported at runtime.