Hi,

If I have
Code:
std::vector<SomeNode> NodeList;
and a hand written algorithm which does most of the time throw around some kind of references to the nodes inside nodelist (store, delete, compare, sort, move, de-reference the references).

What is faster: using offset as reference into the vector or better use iterators?

I'm not sure.
While using offsets I'm doomed to always have one indirection.
But are iterators really faster? I know in VS2005 they are of class type (at least in debug mode) to allow a lot of run time checks. What happens in release? are they plain pointers there?

Thank you!