I'm just curious so I looked into it. I'm just, familiar, with what FFT, DCT, IDCT and Fourier transform is for.. but not really that much and my math is fading..
I got similar numbers (I'm on 0.3.11) to you and then I tried with (as I recall power of twos are what you should be using):
r=rand(2^20)
Then numbers are much more closer, but still a gap.
You can look at the code and edit! with edit(FFTW.r2r)
I'm not sure the former or latter numbers, are NOT what should be expected (or at least that a slowdown is introduced by Julia).
See here:
That is the (GPL) library that does the heavy lifting (not coded in Julia), and there are the equations behind what you are doing.
You could do something like @profile FFTW.r2r(r,FFTW.REDFT00)
And look into how the profiler works (to see the results), but I doubt you'll see much interesting if it only shows the Julia side..
By just scanning the code I code like this:
execute(precision::fftwTypeDouble, plan) =
ccall((:fftw_execute,libfftw), Void, (Ptr{Void},), plan)
That I assume does all the work (e.g. the FFTW library that it calls).
--
Palli.