title: Storing frequent keys in a map in C++
body: <p>Imagine that I am calculating a double type score for some large number of strings (i.e. 100 millions), and I want to have a sort of caching effect to re-use what I have computed so far whenever it is necessary. Now, the smart way to do this is to store those frequent strings and their scores in the map, to reduce the memory usage. Is there any standard solution for this?</p>