Fastest way to index matrices

See here

   p = 20
   n = 20

     b = zeros(1, p)
     cor_mat =  Matrix{Float64}(I,p,p)
     zstar = Array{Float64}(undef, n, p)
     x = ones(n)
     m = x * b
     idx = collect(1:1:p)


 @time for j in 1:5000

          for i in 1:p
     mm = transpose(m[:,i])  + transpose(cor_mat[i , idx .!= i ]) *
                          inv( cor_mat[idx .!= i , idx .!= i ]) *
                          transpose(zstar[:,idx .!= i] - m[:,idx .!= i])

     ss = cor_mat[i, i] - transpose(cor_mat[i , idx .!= i ])  *
                          inv( cor_mat[idx .!= i , idx .!= i ]) *
                          cor_mat[i , idx .!= i ]
end
end

13.469376 seconds (9.38 M allocations: 6.043 GiB, 12.41% gc time)