[openal] [PATCH] Add some mixer SSE2/4.1 optimisations

Timothy Arceri t_arceri at yahoo.com.au
Tue Jun 3 03:34:59 EDT 2014


On Mon, 2014-06-02 at 18:43 -0700, Chris Robinson wrote:
> On 06/02/2014 03:05 PM, Timothy Arceri wrote:
> > When SSE4.1 is enabled these changes can reduce cpu time spent in OpenAL
> > by 45% during the OpenArena benchmark of the Phoronix Test Suite.
> 
> Looks better. I'm not actually sure you need the enhanced 
> UpdatePositions, though. Actually, since there's a limit of 2048 samples 
> per update, and the increment is limited to 10 (in fixed point), it 
> should be possible to just do:
> 
> DataPosFrac += increment*DstBufferSize;
> DataPosInt  += DataPosFrac>>FRACTIONBITS;
> DataPosFrac &= FRACTIONMASK;
> 
> and not loop at all (the pitch did not used to be capped at 10 when that 
> code was made, so there was a risk of overflow, but that shouldn't be 
> possible now).

Great this is much better :)




More information about the openal mailing list