I read on the Internet that if you are clearing a std::vector repetitively (in a tight loop), it might be better to use resize(0) instead of
std::vector
resize(0)
This sound implementation specific, and is a job for you, your library and a profiler. But as I see it, I cannot see why resize(0) should be quicker when both will in effect have to call erase(begin(),end()).