Improve the iteration performance