> I did try ecl (0.8.x). Maxima's fft is about 1.5x slower than
> bordeaux
> fft, FWIW, and about 10 times slower than cmucl on the same machine.
>
> Ray
>
After some tests I think Maxima's fft (internal) is fine. I think
most of the time is spent in data conversion anyway (in my version too).
I've attached what I think is the final version - at least as far as
I'm concerned.
The results are the same as with the 5.19.1 version. forward/bacward
fft definition is now the same as in 5.19.1 version. It's pretty
fast. I've added data conversion to all three supported datatypes -
maxima lists, lisp arrays and what I call 'maxima symbol
arrays' (symbols with attached lisp arrays), so the functionality is
exactly the same as before, except it's a lot faster.
I haven't tested for all the possible errors the user can make.
There are perhaps a few places the function can be sped up via
'declare' and 'optimize', but nothing too dramatic I think. I've
written plenty of comments and I think the code is now much cleaner.
I haven't touched $polartorect and $recttopolar, but they seem to
ignore the type of input when returning the value. This can be easily
mended via the functions I've written for 'data conversion'.
I'm concerned about the speed of fft on GCL - particularly, does GCL
(on windows) compile the code that is loaded with 'load(fft);' in
Maxima? Otherwise all 'optimizations' are rather pointless for the
90% of userbase that runs GCL on Windows.
An offtopic remark:
- I have been exploring /src/ of Maxima but it's a very unfriendly
place to be. Function naming is cryptic and there's no documentation
available (for old code). I for instance don't know what add* vs add2
does - and would have to spend some amount of time inspecting the
source code to understand. I understand nobody will go documenting /
src/, but perhaps we should make a 'rule' to always add a description
line to the function one modifies and lack any description. Common
Lisp offers some kind of a doc string for defun-s and other
definitions - it's probably the best facility in this case. Even a
one sentence description of what some randomnamed function in /src/
does would be most helpful for newcomers like myself. I don't think
it's much effort for someone who already understands /src/ functions,
but it's invaluable if you're new to the code. This would make Maxima
a bit more friendly project to contribute to.
- also some guidelines about internal function naming conventions
would be helpful (perhaps in a nice PDF), with perhaps basic maxima's
function one has to know to extend Maxima (how to multiply, divide,
add numbers and so on).
Attached are fft.lisp and fft.lisp.patch.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fft.lisp
Type: application/octet-stream
Size: 10609 bytes
Desc: not available
Url : http://www.math.utexas.edu/pipermail/maxima/attachments/20090827/8276e3c8/attachment.obj
-------------- next part --------------
A non-text attachment was scrubbed...
Name: fft.lisp.patch
Type: application/octet-stream
Size: 11049 bytes
Desc: not available
Url : http://www.math.utexas.edu/pipermail/maxima/attachments/20090827/8276e3c8/attachment-0001.obj
-------------- next part --------------
Regards,
Ziga