Re: [linux-audio-dev] Channels and best practice

From: James Courtier-Dutton <James@email-addr-hidden>
Date: Sun Nov 20 2005 - 13:22:29 EET

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
Received on Sun Nov 20 16:15:08 2005

This archive was generated by hypermail 2.1.8 : Sun Nov 20 2005 - 16:15:09 EET