![]() ![]() The second thing I missed is that a struct() with NO fields is NOT empty. What’s even harder to remember is that struct2table(struct()) gives a table. NOT TRUE!įirst of all, the default constructor of struct() gives ONE struct with NO FIELDS (so it’s supposed to correspond to a table). Since a table() is considered empty (by isempty()) if it has EITHER rows INCLUSIVE OR columns (no fields) and the default constructor creates a table, I thought struct() would do the same. ![]() See table() objects.): each field of a struct is a column in a table (heterogeneous array). Performance and memory overhead are the obvious reasons, but the true motivation for me to use SoA is that I’m thinking in terms of table-oriented programming (which I’ll discuss in later posts. As far as struct() is concerned, I’m more inclined to using Struct of Array (SoA) over Array of Structs (AoS), unless all the use cases screams for SoA.
0 Comments
Leave a Reply. |