I got some objects with certain values, for example: (1)
struct massPoint {
double pos;
double vel;
double acc;
} objects[LOTS];
or the same in arrays:
(2)
double pos[LOTS];
double vel[LOTS];
double acc[LOTS];
First question: Is it right if i call (1) padded data and (2) serial data?
Second question: If i do some operations which would only affect vel and acc and no pos, and i have LOTS of them, would (2) be preferable since it would be better in terms of caching performance because the pos[] dont have to be cached this way and in (1) it has to? Or do i not get the concept at all?