For loop performance