Answer from cs61c-ap (Nicole Runsitiyakorn 13543412) for Question 2 The compiler might preform the following optimization because the j loop is shorter and can take advantage of temporal locality. Either way the same ammount of cycles will be preformed, but having the larger loop in the outer portion will emprove preformance.