# How do I pick an optimal window size for overlap add/save method algorithmically

Currently I've implemented an overlap-add method using resources on the internet, but I couldn't find a well documented way to minimize the cost of the method. In other words, how do I pick the window size so that the algorithm would work with the best performance possible? For now I use impulse response size and a constant multiplier to determine window size, but since the input signal size might vary, how to determine multiplier in relation to the input signal size?

My concern is performance, but the bottleneck is not addition, but the amount of performed FFT convolutions. Experimentally I found out that for each impulse response size there is an optimal window size, yet it varies. For example, if I pick 40000 samples of input signal and 128 samples of impulse response signal the optimal ratio between window and impulse response lengths is approximately 1:24.

It seems that Wikipedia suggests to use 1:8 ratio for both methods, as seen in the pseudocode of both overlap-add and overlap-save methods, then in the next section they provide measures of complexity for the methods, but I'm unable to wrap my head around how to utilize this information.

• Have you read the answer to this question and the article cited there? Commented Jan 27, 2020 at 11:54
• @MattL. what article? It leads to the 404 page Commented Jan 27, 2020 at 12:24
• Try again, it's there now. Google is your friend. Commented Jan 27, 2020 at 12:56
• I have a comprehensive answer about this in another answer. You still have to come up with your relative cost coefficients, but if you have a 128 sample impulse response, i think you want an FFT size of either 512 or 1024. Commented Oct 24, 2020 at 17:46
• I recommend the paper by fred harris “On the Use of windows for harmonic analysis using the discrete Fourier transform” where he provides the analytic considerations you seek Commented Jun 21, 2021 at 17:02