[LAD] Integer performance

Clemens Ladisch clemens at ladisch.de
Sat May 2 19:06:40 UTC 2015


Will Godfrey wrote:
> If you are using only small values is there really any benefit in using chars
> and shorts rather than just using integers everywhere and letting the compiler
> sort it out?

That depends on the CPU architecture.

Which is why <stdint.h> defines types like int16_fast_t.

> Also, would bool actually have an extra cost due to masking needs?

What masking?


Regards,
Clemens


More information about the Linux-audio-dev mailing list