Re: Advice on iterator vs. index efficiency

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux