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)
Looking at Dinkumware STL source, both effectively call erase(begin(), end());
erase(begin(), end());
clear() is slightly more efficient, unsurprisingly., as it has just the one case to deal with. but I wouldn't expect it's measurable.
clear()