[PATCH] D41976: Low-hanging fruit optimization in string::__move_assign().
Timothy VanSlyke via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Tue Jan 16 08:24:52 PST 2018
tvanslyke added a comment.
Sorry if I'm spamming too much. Just to be clear, I agree completely with your sentiment but I'm pretty sure that `__clear_and_shrink()` has exactly the same effects as `clear(); shrink_to_fit();`. Maybe `reserve(0);` should should be unconditionally calling `__set_long_cap(0);` immediately after deallocating? I could be missing something obvious though.
More information about the cfe-commits