I've read historically that pre-increment is faster/better for a variety of reasons (and also that it should be moot on modern compilers). But isn't there additional processing required for the copy process when objects come into play?
For example:
iterator iterator::operator++(
int)
{
iterator copy(*this);
_index++;
return copy;
}
iterator& iterator::operator++() {
_index++;
return *this;
}
The pre-increment operator needs a copy operation. So simply doing this should be slower:
loop {
--object
}
Does the philosophy of "pre vs post" only apply to primitives?