Problem 1 Consider the following loop which takes 8 cycles to execute one iteration (assuming cache hits). for (i = 0; i
Posted: Fri May 20, 2022 6:37 pm
Problem 1 Consider the following loop which takes 8 cycles to execute one iteration (assuming cache hits). for (i = 0; i < 562; i++) { A = c * A; } The penalty for a cache miss is 64 cycles. Each element of array A is 4 bytes. Assuming a cache block size of 4 bytes, show the above loop with compiler inserted prefetch instructions (as seen in class). Now assume that the cache block size is 16 bytes (assume aligned cache blocks i.e., a cache block starts at A[O]). Show the loop with compiler inserted prefetches.