Programming in C, this is for a microcontroller application, so I really care about computational efficiency here.
I have 16-bit signed integers coming in from an ADC at just north of 16 kHz. Every tick, I get 16 numbers. Of those, I need to average two different sets of 6, so the final output is a set of 6 numbers. Therefore, my application-specific question is how do I average six numbers with the minimum of computing overhead?
I know that with a set of numbers whose length is a power of two, I can divide using bit-shifting after the addition operations. Since I have 6 numbers, what's the best way to accomplish this?