The ordering is not needed, and DenseMap is faster. I can measure time spent in the SaveToCache() calls reduced to ~40% during LLDB startup (and the total startup cost reduced to ~70%).
Details
Details
Diff Detail
Diff Detail
Event Timeline
Comment Actions
I feel like this came up in the past and there was a reason an unordered map couldn't work? Maybe I'm confusing this with something else. Added Pavel as he would certainly know.
Could we use a llvm::DenseMap here, as it's supposedly even faster than its STL counterpart?
(Adding myself as a reviewer too so this shows up in my review queue)
Comment Actions
This is pretty new code, so I think you must be thinking of something else.
I don't see any reason why this would have to be a std::map. I think the code just hasn't been optimized yet.