In C++11, how does a 2D vector against 1D vector in terms of time?
In the 2D vector given, all the inner vectors are of the same size.
Ex:
std::vector<std::vector<int>> X{10, std::vector<int>(4)};
vs
std::vector<int> Y(40);
Which avatar of the vector would perform better when the elements are randomly accessed?