
7 May
2014
7 May
'14
1:56 a.m.
On 5/6/2014 1:33 PM, Neil Groves wrote:
I have done extensive performance measurements upon various arrangements of having data in iterators versus ranges. I have been surprised how many times a bloated iterator outperforms the indirection to a separate range object.
In my (admittedly limited) testing, I agree. In some places in my code, I've re-bloated iterators I had previously un-bloated simply for performance reasons. But I've also noticed that at least in some situations, the optimizer can see through the pointer-to-range stored in the iterator. That happens when the use of the iterator is not far from where the iterator was created. \e