I have a two 1 by 10^3 matrix which its elements change in each step of the loop of simulation. To find a new element in each for loop step, I need 2*1000 Gaussian random numbers. the number of loop steps is equal to 10^5. Which method is less time-consuming in this case?
creating two 10^5 by 1000 random matrix before for loop and call them inside the loop.
creating two 1 by 10^3 random matrix in each step of the loop?