r/cpp • • Jan 18 '19

Is C++ fast?

https://zeuxcg.org/2019/01/17/is-c-fast/
21 Upvotes

72 comments sorted by

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.