Minor critique, but for the part where you enable the optimization in gcc, I think just showing the individual option (-foptimize-sibling-calls) would be better and then mention that it's enabled in -O2/O3. :)
@hashcodez7572 жыл бұрын
very well explained sir!!
@CppNuts2 жыл бұрын
Thanks man..
@varungoyal30713 жыл бұрын
Awesome explanation, quick question though does it work with O3?
@CppNuts3 жыл бұрын
Yes
@LeoLeo-nx5gi3 жыл бұрын
What was the optimization Sir? In the code which u showed at the end, coz both codes look same, so Sir can u please say what change did u made? Bcoz I can see return in both the codes and both are similar, thank you, would wait for ur reply.
@CppNuts3 жыл бұрын
Actually the whole point is when you return that time if you are doing some operation then it is not tail recursive optimised, and in second example i showed how to manipulate and get pure tail recursion optimisation. Go through video again, you will get it. At first it is hard to digest. And i think i rushed a little in this video, i could have gone more deeper, but now can't do much. May be i will release new video on same with better explanation but that is just in case if so many people find it hard to understand.
@LeoLeo-nx5gi3 жыл бұрын
@@CppNuts Thanx for the explanation, would watch again