My julia code is somehow much slower than the matlab code