.. DO NOT EDIT. .. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. .. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: .. "_build/auto_examples/benchmarks/FFT_bench.py" .. LINE NUMBERS ARE GIVEN BELOW. .. only:: html .. note:: :class: sphx-glr-download-link-note :ref:`Go to the end ` to download the full example code .. rst-class:: sphx-glr-example-title .. _sphx_glr__build_auto_examples_benchmarks_FFT_bench.py: Benchmark of FFT algorithms =========================== .. GENERATED FROM PYTHON SOURCE LINES 7-9 This benchmark compares execution times of several FFT functions using different backends The plots give the measured execution time of the FFT as a function of the input length .. GENERATED FROM PYTHON SOURCE LINES 9-29 .. code-block:: Python def fft(x): scipy.fft.fft(x) def rfft(x): scipy.fft.rfft(x) def dct_I(x): scipy.fft.dct(x,1) def dst_I(x): scipy.fft.dst(x,1) def dct_III(x): scipy.fft.dct(x,3) def dst_III(x): scipy.fft.dst(x,3) .. image-sg:: /_build/auto_examples/benchmarks/images/sphx_glr_FFT_bench_001.png :alt: Scipy backend, PYFFTW backend :srcset: /_build/auto_examples/benchmarks/images/sphx_glr_FFT_bench_001.png :class: sphx-glr-single-img .. rst-class:: sphx-glr-timing **Total running time of the script:** (0 minutes 0.999 seconds) .. _sphx_glr_download__build_auto_examples_benchmarks_FFT_bench.py: .. only:: html .. container:: sphx-glr-footer sphx-glr-footer-example .. container:: sphx-glr-download sphx-glr-download-jupyter :download:`Download Jupyter notebook: FFT_bench.ipynb ` .. container:: sphx-glr-download sphx-glr-download-python :download:`Download Python source code: FFT_bench.py ` .. only:: html .. rst-class:: sphx-glr-signature `Gallery generated by Sphinx-Gallery `_