Why nobody mentioned it so far? Why is everyone into poor little ++i?
One of the best little things you can easily do, to not pessimize your code:
Effective C++ by Scott Meyers, Item 20:
Prefer pass-by-reference-to-const to pass-by value
Example:
// this is a better option
void some_function(const std::string &str);
// than this:
void some_function(std::string str);
In case of short std::string you might not win much, but passing big objects like that, can save you quite a lot of computing power as you avoid redundant copying. And can also save you from a bug or two if you forgot to implement your copy constructor.