sammccall added inline comments.

================
Comment at: clang/lib/ASTMatchers/ASTMatchFinder.cpp:902
   // Maps (matcher, node) -> the match result for memoization.
-  typedef std::map<MatchKey, MemoizedMatchResult> MemoizationMap;
+  typedef std::map<MatchKey, MemoizedMatchResult, std::less<>> MemoizationMap;
   MemoizationMap ResultCache;
----------------
klimek wrote:
> Ok, if this actually matters, we should also not use a std::map here, but a 
> llvm::DenseMap (or do we rely on iteration invalidation semantics here?).
Belated +1. 5% seems like this performance *does* matter, so DenseMap::find_as 
should be yet faster.
It looks like BoundNodesTreeBuilder would need a DenseMapInfo, but all the 
other members are hashable already.


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D80202/new/

https://reviews.llvm.org/D80202



_______________________________________________
cfe-commits mailing list
cfe-commits@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits

Reply via email to