# Is FIR decimation the fastest possible method for integer downsampling?

For a digital music synthesizer I am developing, I have a stream of incoming samples $x_i$ and would like to downsample by $M$ to obtain a stream of samples $y_{Mi}$. I am currently bandpassing the signal with an FIR which is a brick-wall filter windowed by Blackman-Harris, and it sounds great to my ears. But I have to compute $y_{Mi} = \sum_{j=0}^{N-1} x_{Mi-j} h_j$ for every outgoing sample. $N$ is usually 64 to 256, and $M$ is usually 8 or 16, so an FFT convolution doesn't seem worth it for performance.

If there a better method than naive FIR for integer decimation of audio at these scales? Can I make some reasonable tradeoffs in quality to achieve better performance? For example, polyphase decimation is a nice trick, but since RAM/cache is not an issue, I believe they should run in the same speed since they involve an equal number of multiplications.

• Very good question! Which architecture are you working in? Software, hardware, firmware? What about paralellizations? A polyphase filter would be faster when properly implemented... Jun 12, 2017 at 2:24
• Sure! This software is for desktop operating systems (x86_64 with at least SSE2) using float32s but I'm also interested in answers for ARM Cortex M7 chips like STM32F7s, since I work in that area as well. In both cases, the algorithms will be single threaded. I will look more into polyphase filters to make sure I'm implementing them correctly (I'm probably not.) Jun 12, 2017 at 2:33
• @Fat32 what kind of polyphase filter? Jun 12, 2017 at 8:32
• @OlliNiemitalo the kind? I don't know its kind, but given an FIR impulse response of length L used in a standard decimation by M scheme, you can decompose h[n] into its M polyphase components that're running in parallel form. When implemented within parallel hardware (multicore cpu or better the GPU) it will be faster, in contrast to OP's statement in his last paragraph... A single-threaded software implementation, however, is not achieving that benefit. Jun 12, 2017 at 10:59
• @Fat32 FIRs are also parallelizable in the same way the polyphase filters are, because you can just do a sum reduction. But in my application, this algorithm is one of thousands occurring on a system to produce the final audio stream, and I already parallelize on a higher level, so I don't do algorithm parallelization. Jun 12, 2017 at 11:08