[linux-audio-dev] Channels and best practice
James Courtier-Dutton
James at superbug.co.uk
Sun Nov 20 11:22:29 UTC 2005
Jussi Laako wrote:
> On Sun, 2005-11-20 at 12:54 +1100, Dave Robillard wrote:
>
>>Out of curiosity, how expensive is this runtime architechture check?
>
>
> It's done only once at initialization time and even there it's matter of
> < 100 machine instructions.
>
> At runtime the cost is doing integer comparison.
>
>
For multimedia applications, one crafts a different entire function per
CPU type. One then simply uses function pointers to select the best
function at init stage. This therefore results in a jump without a
comparison.
For example, A resampling routine. There is a CPU specific function to
handle a block of samples, so the extra "jump" cost is only used per
sample block, and not per SIMD instruction.
James
More information about the Linux-audio-dev
mailing list