Answer from cs61c-aj (Kevin Li 15855812) for Question 2 The optimization is that for the second loop the program is accessing x[i] for 20 times and it will become all hits because the first index to the array is whats important because x is an array of array so as long as you are accessing x[i][?] then it will be hitting the same memory in cache. However in the first loop before optimization each inner loop changes x[i] so each time it will be a miss because it would have to fetch from memory what x[i] is causing a slower processing time.