Dear guest, you must be logged-in to participate on CrazyEngineers. We would love to have you as a
member of our community. Consider creating an
account or login.
Whenever Inline Functions are called, the compiler inserts the complete body of the function in every place that the function is called.
This is different from generating code to call the function in the one place it is defined.
I assume that you're asking the advantages of using Inline Functions.
If you are developing really small and simple programs, use of inline functions is great, because it reduces the overhead of -
1. calling function
2. variables push and pop on stack (that happens during call to functions)
3. return call from function
Inlining won't make much sense unless you understand a little bit about assembly or machine language. A function call involves overhead as the CPU has to keep track of current instruction pointer, then allocate stack space for the function call, execute the same and finally, restore the instruction pointer. With inlining, the code is in sequence and hence this overhead is not required.