Some compilers detect tail recursion and optimize it through a technique known as _______. 

  • tail-call optimization 
  • loop unrolling 
  • inline expansion 
  • code compression
Tail-call optimization (or TCO) is a technique where the compiler replaces a function's tail call (a recursive call that's the last thing the function does) with a jump instruction, essentially converting the recursion into iteration and thereby avoiding new stack frame creation.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *