stable_partition on objects is slow (due to copies). Do it on pointers
instead.
Details
Diff Detail
- Repository
 - rCTE Clang Tools Extra
 - Build Status
 Buildable 23199 Build 23198: arc lint + arc unit 
Event Timeline
| clangd/CodeComplete.cpp | ||
|---|---|---|
| 326 | this seems a bit overly complicated. It does seem like a worry that this code is hot enough to optimize, especially compared to *generating* the list. But I think we can do something simpler...  | |
| 410 | if this is really hot, you might want to reserve(C.RankedIncludeHeaders.size())  | |
| 419–421 | What about where InsertableCandidates is a vector declared above, and then just move it onto the end of the list after the loop?  | |
The implementation looks fine, but I believe we concluded that seeing huge lists here was basically a bug.
So you may not want to land it, if you prefer to keep things simple. Up to you.
this seems a bit overly complicated. It does seem like a worry that this code is hot enough to optimize, especially compared to *generating* the list.
But I think we can do something simpler...