2 ms·
I've seen an argument that collections of objects should be allocated field-wise. So an array of points would actually be two arrays, one for x-es, one for y-s
by scotty79 3y ago
I've seen an argument that collections of objects should be allocated field-wise. So an array of points would actually be two arrays, one for x-es, one for y-s addressed by index of the object in the collection.
I wonder how programming would look if that was the default mode of allocation in C++. Pointers to objects wouldn't make much sense then.