-10% by replacing for-yield with a while loop