I would call this one premature, because there are trade-offs in both directions. You’re trying to avoid a re-hash, which could be slow, but the benefit of O(1) lookups might dwarf that. Or maybe all of the code for either type of map takes so little time compared to your other work that it really doesn’t matter. Until you have a real workload to measure, you can’t be sure you’re optimizing the right thing.
If you can easily figure out the expected size, then sure, reserve capacity to avoid realloc. But if you have to do contortions to get this, then I wouldn’t worry about it until reallocs appear in a performance profile.
I don’t think there’s a clear line. It’s more of a judgement call in the effort required to make those optimizations. Don’t waste a lot of time thinking about performance of a particular area until you know it’s a problem. Start by writing code that’s good enough to get the job done, then measure to see where your performance intuitions were wrong.
Sometimes even the things you “know” will be wrong. An ArrayList is generally bad for a FIFO, sure, but if that FIFO happens to stay very small it might be fine, or even faster than other options.