-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Faster fft with pyfftw #281
Conversation
a39fc27
to
f75db33
Compare
ba8a8ad
to
e069d2f
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Other than that, I think this looks okay as an implementation.
Though, what do I gain by setting forward
or backward
to false in the initialiser? Is it just a runtime savings?
Some unit tests, even very rudimentary ones would be nice.
Also, making pyfftw
a hard requirement, forces anyone wanting to install caput
at all to also install the FFTW clib, even if they're not FFT-ing with caput. I would prefer it be optional (with the understanding that not installing it means this module won't work). As-is this is going to force us to install FFTW on, say, wind
, just so we can access ch_ephem
.
Re. the |
975d2bf
to
38dd756
Compare
I've added unit tests and made the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Very nice.
I guess we could implement it down the road if anyone want
Yeah, that definitely feels like something to leave until someone actually wants it for something.
38dd756
to
09ce0aa
Compare
09ce0aa
to
496d6fa
Compare
This adds a basic class and api to do ffts using the fftw backend, which is implemented by pyfftw and is quite a bit faster than the backend used by
numpy.fft
andscipy.fft
.In particular, I found that
fftw
scales much better when multiple cores are available, but even single-threaded benchmarks show a speedup of around 3x.The
pyfftw
api is a bit cumbersome to use, so I put this module together to try to abstract it a bit for some common fft functions with minimal overhead.So far, I've just implemented a few functions which I've found useful. It's easy to expand as needed, but I want to keep this fairly minimal - as things get more complex, there's less of a reason to re-implement them.