When I started playing around with audio programming. I setup a whole collection of DSP classes and made all there points of entry and the way they process the same. Whilst doing benchmarking I found using doubles throughout actually improved speed by 20 - 30% which didn’t seem right to me for obvious reasons. I was aware of SIMD but thought that was purely a compiler optimisation. Doing some deeper reading into how compiler uses particular opportunities to run 2 for the price of one operations on certain floating point operations and it seems it’s as much to do with with way you code as it is the intelligence of the compiler.
So are there any hard and fast rules to increase the chance for SIMD opportunities?
I now know that the idea is to fill a the SIMD 128bit register with 4 x floats or 2 x doubles (which I now know is where my performance boost came from) and also access memory in a uni-stride way (which I know is a good practise anyway on any platform)