Question: Exercise 1. [15 Marks] Consider the following functions. For each function, discuss its . instruction locality. Is there good locality or bad locality? Explain why.
![Exercise 1. [15 Marks] Consider the following functions. For each function,](https://dsd5zvtm8ll6.cloudfront.net/si.experts.images/questions/2024/09/66f3037190874_16066f30370ef378.jpg)
Exercise 1. [15 Marks] Consider the following functions. For each function, discuss its . instruction locality. Is there good locality or bad locality? Explain why. Be precise; consider both spatial and temporal locality. (a) int f(int a, int b) { int t1 = 2 * a; int t2 = -3 * b; return ti + t2; } > int g(int* A, int n) { for (int i = 0; i
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
