Difference between revisions of "Inline Specifier"
From Embedded Systems Learning Academy
Proj user8 (talk | contribs) (Created page with "'''inline''' is a specifier for a function in C/C++ that tells the compiler to replace the function call in assembly with the contents of the function. === Basic Example of t...") |
Proj user8 (talk | contribs) |
||
Line 1: | Line 1: | ||
− | '''inline''' is a specifier for a function in C/C++ that tells the compiler to replace the function call in assembly with the contents of the function. | + | '''inline''' is a specifier for a function in C/C++ that tells the compiler to replace the function call in assembly with the contents of the function. It is most often used when tying to speed up a program as it takes out the overhead of a function call. it is particularly useful with small functions that are called often. However, the specifier will also increase the size of your program as it takes away the benefit of re-usability at the assembly level. |
− | === Basic Example of the '''inline''' | + | === Basic Example of the '''inline''' Specifier === |
=== '''inline''' Specifier With a Recursive Function === | === '''inline''' Specifier With a Recursive Function === |
Revision as of 00:36, 15 December 2016
inline is a specifier for a function in C/C++ that tells the compiler to replace the function call in assembly with the contents of the function. It is most often used when tying to speed up a program as it takes out the overhead of a function call. it is particularly useful with small functions that are called often. However, the specifier will also increase the size of your program as it takes away the benefit of re-usability at the assembly level.