On Wednesday, September 23, 2015 at 3:47:43 AM UTC-4, Sheehan Olver wrote: > > OK that makes sense. But why is Julia 2x slower than Matlab for some > values of n (see below, the timing difference is consistent when looped > over)? Shouldn’t they both be using FFTW? >
I think that maybe Matlab defaults to using FFTW's real-data routines when the data is real, whereas Julia only uses the real-data routines if you request them via rfft etc. (The rfft functions have the advantage of requiring half of the storage for the output compared to a complex FFT, whereas I think Matlab pads the output back to the full length using the mirror symmetries.)
