| 1. |
What Happens When Recursive Functions Are Declared Inline? |
|
Answer» Inlining an RECURSIVE FUNCTION reduces the overhead of saving CONTEXT on STACK. But, inline is merely a suggestion to the compiler and it does not guarantee that a function will be inlined. Obviously, the compiler won't be ABLE to inline a recursive function infinitely. It may not inline it at all or it may inline it, just a few levels deep. Inlining an recursive function reduces the overhead of saving context on stack. But, inline is merely a suggestion to the compiler and it does not guarantee that a function will be inlined. Obviously, the compiler won't be able to inline a recursive function infinitely. It may not inline it at all or it may inline it, just a few levels deep. |
|