Fixes #6663 (much more optimizations for iterator_range, updated documentation and performance test results)