RangeIterator optimization