Optimize the iterator