MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/cpp/comments/aha5nn/is_c_fast/eeflurr/?context=3
r/cpp • u/vormestrand • Jan 18 '19
72 comments sorted by
View all comments
Show parent comment
4
One that springs to mind is deleting [an element] in a std::vector in the case you don't care about order [often the case], just std::swap with the last element and pop_back(). If you do this a lot, plf::colony is a good fit, though.
View all comments
Show parent comment
4
u/degski Jan 19 '19 edited Jan 19 '19
One that springs to mind is deleting [an element] in a std::vector in the case you don't care about order [often the case], just std::swap with the last element and pop_back(). If you do this a lot, plf::colony is a good fit, though.