On 06/10/2007, Neal Becker <ndbecker2@xxxxxxxxx> wrote: > I was wondering if gcc would see that the index version is just incrementing > through, and avoid the nested index calculations. This seems to be > supported by your statement that they generate the same code. For a vector I'm confident that it does do something. I was thinking more for something like deque, where, while O(1), operator[] is more than a simple addition. ~ Scott