I wonder which container uses less memory between std::map
and std::vector
with a large set of data.
Loads of posts talk about efficiency, and my priority is not efficiency but memory consumption. So, if we don't know the number of our data (in my case can be over 12,000,000 entries, every entry is a string of 20 characters), is map really better than vector?