comp.lang.idl-pvwave archive
Messages from Usenet group comp.lang.idl-pvwave, compiled by Paulo Penteado

Home » Public Forums » archive » Re: 2D FFT Slow. Any ideas?
Show: Today's Messages :: Show Polls :: Message Navigator
E-mail to friend 
Return to the default flat view Create a new topic Submit Reply
Re: 2D FFT Slow. Any ideas? [message #37234] Mon, 08 December 2003 00:02 Go to previous message
Brian is currently offline  Brian
Messages: 27
Registered: March 2001
Junior Member
Hi,

The IDL code is

A=dcomplex(randomn(seed,2048, 2048,/DOUBLE), randomn(seed,2048,
2048,/DOUBLE))
t=systime(1)
FA=fft(A,-1)
print, systime(1)-t

The corresponding matlab code is

A = randn(2048,2048) + i*randn(2048,2048);
tic; FA=fft2(A); toc

I get around 10.4 sec in IDL, and around 3.7 sec in MATLAB 6.5

-brian


"R.G. Stockwell" <noemail@please.com> schrieb im Newsbeitrag
news:gN3Ab.767$o_.32178@news.uswest.net...
> "Brian" <brian.huether@NOdlrSPAM.de> wrote in message
> news:a298a85e9af4e70d51199dcae50c4c81@news.teranews.com...
>> I did a little benchmark between IDL and MATLAB. In each case I created
a
>> random double precision complex array of size 2048 by 2048 and timed how
>> long the 2D FFT took. In MATLAB 6.5 it took about 3.5 sec, and in IDL,
it
>> took about 10 sec. Is there a way to have IDL use MATLAB for the FFT,
>> perhaps using activex? Or would the overhead in using activex defeat the
>> purpose?
>>
>> thanks,
>>
>> brian
>>
>>
>
> You could try calling an external routine, some of the best being
available
> at (fastest ft in the west)
>
> http://fftw.org/
>
> Cheers,
> bob
>
> PS I can't believe active x calls would improve speed, but hey, you never
> know.
> And, I'm surprised that the canned IDL is not very fast. Any chance you
> don't really
> have a 2048^2 array in idl (did you make a 2049^2 array for instance?)
>
> If you post a blip of example code, I can run them here (matlab and idl)
and
> verify the time difference,
> which would be very interesting.
>
>
[Message index]
 
Read Message
Read Message
Read Message
Read Message
Read Message
Previous Topic: DXF / 3DS data conversion general access
Next Topic: how to pass a complex variable to fortran subroutine

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ RSS ] [ PDF ]

Current Time: Wed Oct 08 11:29:17 PDT 2025

Total time taken to generate the page: 0.00394 seconds