Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

C++ STL

Name: Anonymous 2009-08-28 12:46

Is it faster to iterate through stl vector with the [] operator or an iterator?
I would think that the iterator is faster but I'm too lazy to test.

Name: Haxus the Correct++ 2009-08-28 17:03

>>5 is the winner[1]

References:
1. http://www.cplusplus.com/reference/stl/vector/
   "Accessing individual elements by their position index (constant time)."
   "Iterating over the elements in any order (linear time)."

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List