Relative performance of loops