mathnet / mathnet-numerics

Math.NET Numerics
http://numerics.mathdotnet.com
MIT License
3.52k stars 899 forks source link

Disabling parallel processing in FFT providers #738

Open rsinnig opened 4 years ago

rsinnig commented 4 years ago

It would be beneficial to have a MathNet.Numerics.Providers.FourierTransform.FourierTransformControl option to disable automatic parallel processing inside FFT providers for FFT transform sizes >= 1024. If parallel processing is already applied on higher level (e.g. parallel processing of multiple signals) the additional level of parallelization might cause (minor?) performance degradation. Applying parallel processing on higher level is usual more performant, since less thread handling overhead is created.

rsinnig commented 4 years ago

My first statement is not valid for all transform sizes. I've done some profiling: Two level parallel processing (high level & FFT provider internal) has indeed performance gain for transform sizes >= 64k.