Is there a way to implement the following function faster?
Seeds = rand(200,90,15000,10) Mat = rand(200,200) @views function testfunction(Seeds,Mat) (J,T,N,S) = size(Seeds) ν = zeros(Float32,J,T,N,S) W=0.75.*exp.((-0.003).*Mat) W[diagind(W)] .= 1 C=cholesky(W) Ctemp = copy(C.L) @inbounds for n=1:N, s=1:S, t=1:T ν[:,t,n,s] = Ctemp*Seeds[:,t,n,s] end return ν end
It usually takes around
92.284776 seconds (26.64 M allocations: 29.804 GiB, 3.92% gc time)