3 ms·
Well for a bunch of parallel arrays you aren't really moving big blocks. Consider this: struct City { char *name; int popstrat[5]; float bound
by woodman 11y ago
Well for a bunch of parallel arrays you aren't really moving big blocks. Consider this:
struct City {
char *name;
int popstrat[5];
float bounds[2];
};
A a memcpy on struct City would take care of eight distinct values, whereas a copy operation on a parallel arrays version would take at least three separate memcpy calls (maybe eight if naively implemented).
I certainly agree with you on the weight given to O notation though.