Possible Duplicate:
Is there a performance difference between i++ and ++i in C++?
I am writing a program where an iterator is used to loop through a std::vector. Somebody told me that doing ++it in the for statement leads to more efficient code. In other words, they are saying that:
for ( vector<string>::iterator it=my_vector.begin(); it != my_vector.end(); ++it )
runs faster than
for ( vector<string>::iterator it=my_vector.begin(); it != my_vector.end(); it++ )
Is this true? If it is, what is the reason behind the efficiency improvement? All it++/++it does is move the iterator to the next item in the vector, isn't it?