https://gcc.gnu.org/onlinedocs/gcc-4.1. ... nline.html5.33 An Inline Function is As Fast As a Macro
By declaring a function inline, you can direct GCC to integrate that function's code into the code for its callers. This makes execution faster by eliminating the function-call overhead; in addition, if any of the actual argument values are constant, their known values may permit simplifications at compile time so that not all of the inline function's code needs to be included. The effect on code size is less predictable; object code may be larger or smaller with function inlining, depending on the particular case.
Inlining of functions is an optimization and it really “works” only in optimizing compilation. If you don't use -O, no function is really inline.....
GCC does not inline any functions when not optimizing unless you specify the `always_inline' attribute for the function, like this:
/* Prototype. */
inline void foo (const char) __attribute__((always_inline));
Reference discussion
(1)
http://www.avrfreaks.net/index.php?name ... ic&t=82874(2)
http://blog.roodo.com/rocksaying/archives/2139426.html (Chinese page)