sammccall marked an inline comment as done. sammccall added inline comments.
================ Comment at: clangd/index/Index.h:136 + // Intern table for strings. Not StringPool as we don't refcount, just insert. + llvm::StringSet<llvm::BumpPtrAllocator> Strings; llvm::DenseMap<SymbolID, Symbol> Symbols; ---------------- ilya-biryukov wrote: > A comment on why we use `BumpPtrAllocator` here might be useful. > I.e., it uses more memory than malloc, but we're getting better data > locality. (I hope that I got its intention right) It's strictly better than malloc for us I think: - no malloc bookkeeping/padding memory overhead - we make lots of tiny allocations, they're much cheaper in CPU - the locality you mentioned There's no extra memory usage: stringset doesn't use the allocator to allocate the hashtable, just the nodes. Added a comment. Repository: rCTE Clang Tools Extra https://reviews.llvm.org/D41483 _______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org http://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits