loop performance tweaks