Operation A
I have N vectors, each of which contains a certain number of unique three-dimensional points. For example: std::vector<double*> vec1;etc.
I perform a sort operation on each of the vectors, for example:
std::sort(vec1.begin(), vec1.end(), sortCriteria());
std::sort(vec2.begin(), vec2.end(), sortCriteria());
std::sort(vec3.begin(), vec3.end(), sortCriteria());
Operation B
Suppose I have a vector called "all_point_vector" that contains 3D points from vec1, vec2, vec3 ...
i.e. 3D points in all_point_vector = points_in_vec1 + .... + points_in_vector3.
and I do a sort operation:
std::sort(all_point_vec.begin(), all_point_vec.end(), sortCriteria());
My question is which of the above methods (operation A or B) will be faster at all? sorting a single vector (all_point_vector) or sorting individual vectors. I'm just interested in the speed of these two operations.