The discrete windowed Fourier transform of an N periodic signal is
For a fixed m, the formula is that of a discrete Fourier transform. Hence the computation is performed with N fast Fourier transforms, which require O(N2 log2(N)) operations.
Windowed Fourier Transform