We know compilers like gcc can do lots smart optimization to make the program run faster. Regarding functions call optimization, gcc can do tail-call elimination to save the cost of allocating a new stack frame, and tail recursion elimination to turn a recursive function to non-recursive iterative one. gcc can even transform some recursive functions […]
The post GCC May “Save” You Some Recursive Functions Calls: an Analysis of a Function Call Stack Length Example is from SysTutorials.