I am having to do floating point maths on arrays of ints, fast and with low latency for audio apps (multi channel). My code works but I wonder if theres more efficient ways of processing in places. I get buffers of around 120 frames of interleaved 32 bit audio integers of 16 or 24 channels, which I then have to convert to arrays of floats / doubles for processing (eg biquad filters). Currently I iterate through the arrays and cast each integer to an element of a float array. Then I process these and cast them back to ints for the write buffer, which I pass back to the lib function (I'm on linux using snd_pcm_readi and snd_pcm_writei). Theres lots of copying and it seems wasteful.
The quicker I can do it the lower my latency so the better the overall performance as its for live sound use.
I have read about SSE and other extensions which can be compiled in with gcc options, and some references allude to being able to pass arrays for streamlined conversion etc, and I wonder if these might help the above. Or maybe I should not bother casting to floats - change my processing functions to use ints, keep track of overflows, maybe use 64 bit ints instead, and or create a separate array for exponent - seems pretty esoteric to me, but I guess its not that hard to implement and only needs to be coded once etc. I have asked a separate question of 'Is FPM required for audio DSP maths, or can it be done in 32/64 bit integer maths before rounding back to 24 bits for output?' which is part of the same topic but I thought I should split it into a different question.