First off, try putting it inside of a function instead of in global scope:

http://julia.readthedocs.org/en/latest/manual/performance-tips/#avoid-global-variables


On Thu, Apr 17, 2014 at 10:15 AM, El suisse <[email protected]> wrote:

> Hi, I want improve the performance of the for loop, any suggestion?
>
> https://gist.github.com/elsuizo/10986149
>
> I try:
>
> k3 = Int64[ sum(s .< z[i]) for i = 2:n-1]
>
> but is still slower than Matlab
>
>
> Thanks in advance
>

Reply via email to