Tail recursion is a compiler optimisation. When the final statement of a function is a recursive call into the same function, the compiler can eliminate that call completely. Consider the (simplified) quicksort algorithm: void qsort (int* array, unsigned lbound, unsigned ubound) { unsigned pivot; if (lbound>=ubound) return; pivot = partition (array, lbound, ubound); qsort (array, lbound, pivot-1); qsort (array, pivot+1, ubound); } This function has two recursive calls, however the second call is a tail recursion because as soon as we return from that instance of the function, we also return from the current instance. As a result, the values of the local variables are no longer relevant to the current instance. That being the case, instead of calling the function a second time and thus crea