[Numpy-discussion] Enhancements for NumPy's FFTs

Sturla Molden sturla at molden.no
Sat Mar 14 21:23:50 EDT 2009


> Give it a shot. Note that the fft transforms also use int instead of
> intp,
> which limits the maximum transform size to 32 bits. Fixing that is
> somewhere
> on my todo list but I would be happy to leave it to you ;) Although I
> expect
> transforms > 2GB aren't all that common.


By the way... When looking at fftpack.c there are two things that would
likely improve the performance.

1) If we used ISO C (aka C99), arrays could be restricted, thus allowing
more aggressive optimization. Now the compiler has to assume aliasing
between function arguments. But as the C code is translated from Fortran,
this is not the case.

2) In C, indexing arrays with unsigned integers are much more efficient
(cf. AMDs optimization guide). I think the use of signed integers as array
indices are inherited from Fortran77 FFTPACK. We should probably index the
arrays with unsigned longs.

Sturla Molden









More information about the NumPy-Discussion mailing list