I\'m using std::map
to store a lot of elements (pairs of elements) and I have a \"little\" doubt. What is more efficient to iterate all elements over my
Does it really matter? these are the types of the micro optimizations you must try to avoid IMHO. Also, even if the iteration time changes for very large number of elements in the map, the fact that you are trying to iterate through all the elements of such a big map means that most probably you have chosen a wrong data structure.