performance improvement for random-access iterators
update for v1.1.3