Here's a version that's 7x faster (and almost 8x if you disable bounds 
checking). The main thing is to avoid indexing into arrays with ranges (as 
in u[i:j]) if you can, since that will allocate and copy a new array each 
time. And also, like Patrick said, globals should usually be declared with 
'const'.

On Thursday, July 31, 2014 8:38:33 AM UTC-7, Neal Becker wrote:
>
> Attached is my 1st attempt at julia, it is a simple FIR filter, which I 
> translated from my c++ version. 
>
> It is benchmarking about 10x slower than python wrapped c++ version. 
>
> Any suggestions?

Attachment: firmod2.jl
Description: Binary data

Reply via email to