[SciPy-dev] Changing the container for SciPy's FFTPACK cache?

Sturla Molden sturla@molden...
Mon Mar 16 08:42:42 CDT 2009


SciPy's interface to fftpack is different from NumPy's fftpack_lite. One 
notable difference is that SciPy's uses a cache in C, whereas NumPy uses 
a Python dict for the same purpose. SciPy's cache is accessed directly 
from the C wrappers to FFTPACK. This means that SciPy's FFTs are not 
threadsafe, and thus the GIL cannot be released. Thus, SciPy has to lock 
up the interpreter while doing FFTs. Using a Python container with 
ndarrays as cache would allow the GIL to be released when calling 
FFTPACK (cf. ticket #1055 for NumPy). I've posted a patch for NumPy 
yesterday, and I thought of giving SciPy a shot as well (when I can find 
some spare time).

Sturla Molden




More information about the Scipy-dev mailing list