I am running the code below, and it works perfectly. I have some function in Fourier space, and I take the numerical InverseFourierTransform. However, I will have to repeat this calculation often, and therefore I want to use ParallelTable. I've tried this, by replacing Table in the code below by ParallelTable. I am running the code on a computer with 8 kernels. Surprisingly, using ParallelTable doesn't speed up the calculation. I simply find almost the same computation time (not roughly a factor 8 difference)!
Can anybody explain to me what the reason for this is? I've tested the ParallelTable with commands like
ParallelTable[Pause[1]; f[i], {i, 4}] // AbsoluteTiming
and for this case it works fine, but not for the NInverseFourierTransform.
ClearAll["Global`*"];
f[q_] := Sqrt[2/Pi]*(-Sinc[q] + Cos[q]);
k[q_] := Sqrt[Pi/2]/Abs[q];
a = 10^-2;
b = 10^-2;
Needs["FourierSeries`"]
hfourierdomain[ω_] = a*f[ω]*k[ω]/(1 + b*ω^2*k[ω]);
displ = Table[{j, NInverseFourierTransform[hfourierdomain[ω], ω, j]}, {j, -5, 5, 1/60}];

NInverseFourierTransformrelies onNIntegrateinternally, not onFourier. It works on a numerical black-box function, not on a list of numbers. SoCUDAFouriermight not be useful here (it is of course a good replacement forFourier) – Szabolcs Jan 28 at 20:51Fourier[]andFourierTransform[]mixed up. – andre Jan 28 at 21:05