A[:, indx] currently makes a copy. Try replacing it with slice(A, :, indx) (if 
you're on julia 0.4) or use ArrayViews if you're on julia 0.3.

For performance questions, if you aren't using the tools advertised at
http://docs.julialang.org/en/release-0.3/manual/performance-tips/
you will likely find them to be a big help.

--Tim

On Wednesday, February 11, 2015 07:25:38 AM Kyunghun Kim wrote:
> Hi, all.
> 
> I am sorry that I am writing repeating these questions again. (performance
> compared to ~)
> I have some signal processing code written in MATLAB, and rewriting the
> code with Julia.
> 
> The signal processing function take about 1024 x 1024 floating number array
> as input called in loop about 100~1000 times.
> Here is core function of algorithm:
> 
> MATLAB version: https://gist.github.com/moon6pence/3e60772943f206842d31
> 
> >0.16 sec per each call
> 
> Julia version: https://gist.github.com/moon6pence/4b43c63cb4240b31ea10
> 
> >1.4 sec per each call
> 
> Not only julia code is unusually slow, but MATLAB code is also unusually
> fast.
> (Naive C++ implementation of this code takes 100~200 sec, maybe MATLAB JIT
> compiler is doing very well in SIMD)
> 
> I will dig up this julia code line-by-line to find which line takes much
> time.
> But before then, I want get this code checked if there is any mistake on
> code for performance. (or give me tips for vectorized code)
> 
> Thanks.

Reply via email to