Same problem replicated on Ubuntu 16.04. Shouldn't both languages just be 
calling the same library?

My Julia versioninfo():

julia> versioninfo()

Julia Version 0.4.5 
Commit 2ac304d (2016-03-18 00:58 UTC) 
Platform Info: 
  System: Darwin (x86_64-apple-darwin13.4.0) 
  CPU: Intel(R) Core(TM) i5-5257U CPU @ 2.70GHz 
  WORD_SIZE: 64
  BLAS: libopenblas (USE64BITINT DYNAMIC_ARCH NO_AFFINITY Haswell) 
  LAPACK: libopenblas64_ 
  LIBM: libopenlibm 
  LLVM: libLLVM-3.3




On Friday, June 17, 2016 at 12:01:45 PM UTC-7, Logan Williams wrote:
>
> Followup: setting FFTW.set_num_threads(2) (my machine only has two cores) 
> and using rfft closes the gap somewhat, but there's still a substantial 
> difference.
>
> julia> R = rand(5000,5000);
>
> julia> @time rfft(R);
>
>   1.736385 seconds (99 allocations: 190.816 MB, 0.95% gc time)
>
>
> julia> R = rand(512,512);
>
> julia> @time rfft(R);
>
>   0.018692 seconds (93 allocations: 2.012 MB)
>
>
>
> On Friday, June 17, 2016 at 11:56:44 AM UTC-7, Logan Williams wrote:
>>
>> Hi,
>>
>> I'm finding that a 2D FFT in Julia is an order of magnitude slower than 
>> GNU Octave. Does anyone know why this is happening?
>>
>> Thanks,
>> Logan
>>
>> In Octave:
>>
>> >> R = rand(512,512);
>> >> tic; fft2(R); toc;
>> Elapsed time is 0.00377011 seconds.
>>
>> In Julia:
>>
>> julia> R = rand(512,512);
>>
>> julia> @time fft(R);
>>
>>   0.042149 seconds (76 allocations: 8.003 MB)
>>
>>
>> In Octave with non-power of 2 size:
>>
>>
>> >> R = rand(5000,5000);
>>
>> >> tic; fft2(R); toc;
>>
>> Elapsed time is 0.556037 seconds.
>>
>>
>> In Julia with non-power of 2 size:
>>
>>
>> julia> R = rand(5000,5000);
>>
>> julia> @time fft(R);
>>
>>   6.212666 seconds (76 allocations: 762.943 MB, 1.17% gc time)
>>
>

Reply via email to