How complier treats inline functions over macros to reduce execution time?
The compiler is also allowed to not inline the function if doing so would be faster, whereas the compiler cannot not inline a macro. In addition, inline functions are miles safer than macros.
Inline functions are very similar to macros because they both are expanded at compile time, but the macros are expanded by the preprocessor, while inline functions are parsed by the compiler.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With