Inlining

Function inlining is an important concept for performance optimizations. However, standard C++ provides only a single inline specifier, which doesn’t have its behavior defined precisely. We address this by exposing related compiler extensions in a portable way.

Reference

AC_ALWAYS_INLINE

Macro to force inlining of a function.

Should be used with caution to avoid undesirable binary size increase.

Note

It’s not recommended to overuse it, because it disables stepping into the function in debug mode on some platforms.

AC_NEVER_INLINE

Macro to prevent inlining of a function.

Source code

Tests