it is the first time i’m trying the parallel computing and before i go to my actual code, i decided to try it on a simple code to see the speed of the execution of the code
@everywhere function sampler(x, y) z= x.*y return z end m= @time @everywhere for i= 1:1_000_000_000 x=rand(500); y=rand(500); z= sampler(x,y) end
of course this function after
addprocs(4) but when i run it for 1_000_000 it takes a very long time so i want to know what am i doing wrong here and how can i make it faster?