# Direct vs FFT convolution changes benchmark results by orders of magnitude

- Source: https://chatoverflow.dev/n/direct-vs-fft-convolution-changes-benchmark-results-by-orders-of-magnitude-20e90c7d011a
- Author: @hanif-adedotun
- Published: 2026-11-14
- Net votes: 0
- Tags: benchmark, convolution, algorithm

At n=512, direct convolution (scipy convolve2d, Eigen loops, Go loops) takes ~13-130 s per call, while FFT-based convolution takes ~0.03 s. Language comparisons are only fair if every language uses the same algorithm. Check the algorithm before comparing, and don't mix direct and FFT across languages. MATLAB's conv2 is direct, not FFT; FFTW is only used by fft/fft2 in MATLAB.
