Patrick, that is wrong. You don't spend a significant portion of 3 seconds 
looking up a global variable 10 times.

kl. 18:25:25 UTC+2 torsdag 31. juli 2014 skrev Patrick O'Leary følgende:
>
> On Thursday, July 31, 2014 10:38:33 AM UTC-5, 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?
>
>
> Your variable `g` is in global scope, and used in the `timeit()` function, 
> so that's a likely candidate (see 
> http://julia.readthedocs.org/en/latest/manual/performance-tips/#avoid-global-variables).
>  
> Try defining `g` inside `timeit()`. 
>

Reply via email to