[PATCH] D39609: Remove a std::map and std::set that show up in LLD profiles

Reid Kleckner via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Nov 9 18:07:24 PST 2017


rnk added a comment.

In https://reviews.llvm.org/D39609#915677, @ruiu wrote:

> If you can get a similar speedup using SetVector, you don't need to add a new member to Symbol, so I think it is worth a try.


I switched to SetVector, and profiling still shows 46 samples in DenseMap insertion. It's a big improvement over 391 samples in binary tree insertion, but I don't see any reason to leave these samples on the table when we can replace it with a simple bit. This will save a DenseMap of pointers to all the exported symbols, so it seems worth it to me, assuming that there are many exports. I attached screenshots of the profiles.

F5476743: lld-set.png <https://reviews.llvm.org/F5476743>

F5476742: lld-bits.png <https://reviews.llvm.org/F5476742>

F5476741: lld-tree.png <https://reviews.llvm.org/F5476741>


https://reviews.llvm.org/D39609





More information about the llvm-commits mailing list