help-octave
[Top][All Lists]

## interesting FFT benchmarking!

 From: nwerneck Subject: interesting FFT benchmarking! Date: Tue, 29 Jul 2003 13:00:28 -0300 User-agent: Mutt/1.3.28i

```I recompiled my octave 2.1.50 with atlas-sse this time, and now Octave's matrix
multiplication got as fast as Matlab's. But the inv function is still a bit
slower (2.64 x 2.45)...

Anyway, what is interesting is that I couldn't believe how faster Matlab was to
compute the Fourier transforms! Don't they use the same FFT algorithm?

Well, I remembered that wfft has separate functions to complex signals
and purely real signals, so I decided to try something involving complex
signals... now watch this:

octave> A = rand(2048,2048); t0=cputime; B=fft(A); cputime;ans-t0
ans = 0.85000
octave> A = rand(2048,2048)+i*rand(2048,2048); t0=cputime;B=fft(A); cputime;
ans-t0
ans = 0.55000

>> A = rand(2048,2048)+i*rand(2048,2048); t0=cputime; B=fft(A); cputime; ans-t0
ans =
0.8700
>> A = rand(2048,2048); t0=cputime; B=fft(A); cputime; ans-t0
ans =
0.5600

Anybody has any idea of what is going on here? Octave transforms complex
signals as fast as Matlab transforms real signals, and transforms real
signals as slow as matlab does with complex signals!! Why isn't the
transform from real signals faster in octave?...

I think I'll start adding small complex noises to my signals to get them
analysed faster! :) No kidding!!!

octave-2.1.50:130> A = rand(2048,2048);
octave-2.1.50:131> t0=cputime; B=fft(A); cputime; ans-t0
ans = 0.85000
octave-2.1.50:136> Anoise = A+i*e-100*ones(2048,2048);
octave-2.1.50:137> t0=cputime; B=fft(Anoise); cputime; ans-t0
octave-2.1.50:138> t0=cputime; B=fft(Anoise); cputime; ans-t0
ans = 0.54000

of course just adding the noise already takes more time that doing the
straight real signal FT...

--
Nicolau Werneck <address@hidden>         9F99 25AB E47E 8724 2F71
http://cefala.org/~nwerneck                   EA40 DC23 42CE 6B76 B07F
"To his dog, every man is Napoleon; hence the constant popularity of dogs."
-- Aldous Huxley

-------------------------------------------------------------
Octave is freely available under the terms of the GNU GPL.

Octave's home on the web:  http://www.octave.org
How to fund new projects:  http://www.octave.org/funding.html
Subscription information:  http://www.octave.org/archive.html
-------------------------------------------------------------

```