Even though there has been a couple of good answers already I thought I might as well do a quick benchmark. Ran each one 5 million times and used c++11's chrono to measure the time it took.
Heres the code:
#include
#include
The output for 5 million iterations is:
1) took 23448 milliseconds
2) took 22854 milliseconds
3) took 22372 milliseconds
4) took 22988 milliseconds
5) took 21356 milliseconds
GCC version:
g++ (Built by MinGW-builds project) 4.8.0 20121225 (experimental)
My machine:
Intel i5-3570k overclocked at 4.6 GHz
EDIT1: Fixed the code and redid the benchmark.
EDIT2: Added Matthieu M.'s suggestion for C++11's emplace and he is right, emplace is fastest