how in-line for loop is faster than for loop