First, don't double post. Second, please read the manual on performance
tips. You've managed to hit most of the beginner problems.

http://docs.julialang.org/en/release-0.4/manual/performance-tips/
On Jan 2, 2016 6:55 AM, "paul analyst" <[email protected]> wrote:

> I have meny lonng vectors (like a)and need avg for intervals (f.e. 100 )
> in second new vecotr (b)
>
> julia> a=rand(10^7);
>
> julia> b=zeros(a);
>
> julia> tic();for i in  [1:100:10^7;]
>        b[i:i+99]=mean(a[i:i+99])
>       end;toc()
> elapsed time: 0.138522318 seconds
> 0.138522318
>
> I am looking for more faster way , is any ?
> Paul
>

Reply via email to