The use of compiler intrinsics offers the following performance
benefits:
The low-level instructions
substituted for an intrinsic might be more efficient than corresponding
implementations in C or C++, resulting in both reduced instruction
and cycle counts. To implement the intrinsic, the compiler automatically
generates the best sequence of instructions for the specified target
architecture. For example, the L_add intrinsic
maps directly to the ARM v5TE assembly language instruction qadd:
QADD r0, r0, r1 /* Assuming r0 = a, r1 = b on entry */
More information is given to the compiler than the
underlying C and C++ language is able to convey. This enables the
compiler to perform optimizations and to generate instruction sequences
that it could not otherwise have performed.
These performance benefits can be significant for real-time
processing applications. However, care is required because the use
of intrinsics can decrease code portability.
This site uses cookies to store information on your computer. By continuing to use our site, you consent to our cookies.
ARM websites use two types of cookie: (1) those that enable the site to function and perform as required; and (2) analytical cookies which anonymously track visitors only while using the site. If you are not happy with this use of these cookies please review our Privacy Policy to learn how they can be disabled. By disabling cookies some features of the site will not work.