3 ms·
From the way that the parent commenter illustrated the memory layout I thought they were talking about SoA style but your comment is using AoS style. So I woul
by codetrotter 5y ago
From the way that the parent commenter illustrated the memory layout I thought they were talking about SoA style but your comment is using AoS style.
So I would expect the code corresponding to their comment to look like this instead of what you wrote:
class ArchetypeABC {
A[] as;
B[] bs;
C[] cs;
}
class ArchetypeB {
B[] bs;
}
class ArchetypeBC {
B[] bs;
C[] cs;
}
But maybe I misunderstood?
- meheleventyone 5y agoYou’re correct.