Tail Recursion Optimisation

  Рет қаралды 2,458

CppNuts

CppNuts

Күн бұрын

Пікірлер: 13
@slycordinator
@slycordinator 2 жыл бұрын
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. :)
@hashcodez757
@hashcodez757 2 жыл бұрын
very well explained sir!!
@CppNuts
@CppNuts 2 жыл бұрын
Thanks man..
@varungoyal3071
@varungoyal3071 3 жыл бұрын
Awesome explanation, quick question though does it work with O3?
@CppNuts
@CppNuts 3 жыл бұрын
Yes
@LeoLeo-nx5gi
@LeoLeo-nx5gi 3 жыл бұрын
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.
@CppNuts
@CppNuts 3 жыл бұрын
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-nx5gi
@LeoLeo-nx5gi 3 жыл бұрын
@@CppNuts Thanx for the explanation, would watch again
@avtarchandra2407
@avtarchandra2407 3 жыл бұрын
❤️🔥❤️🔥🔥🔥❤️❤️🔥❤️
Big O vs Theta vs Omega Notations
3:02
CppNuts
Рет қаралды 2,5 М.
Tail Recursion Explained - Computerphile
16:05
Computerphile
Рет қаралды 177 М.
1% vs 100% #beatbox #tiktok
01:10
BeatboxJCOP
Рет қаралды 67 МЛН
The 7 Levels of Desmos
3:46
The Unqualified Tutor
Рет қаралды 4 М.
Head vs Tail Recursion | C Programming Tutorial
15:38
Portfolio Courses
Рет қаралды 3,1 М.
Premature Optimization
12:39
CodeAesthetic
Рет қаралды 850 М.
Recursion In C++
7:49
CppNuts
Рет қаралды 7 М.
Tail Call Optimization
8:30
0612 TV w/ NERDfirst
Рет қаралды 8 М.
C++ Weekly - Ep 318 - My Meetup Got Nerd Sniped! A C++ Curry Function
13:37
C++ Weekly With Jason Turner
Рет қаралды 9 М.
Tail Recursion
10:40
Logic Lambda
Рет қаралды 3,4 М.
How C++ took a turn for the worse
5:03
Code Persist
Рет қаралды 336 М.
Writing Code That Runs FAST on a GPU
15:32
Low Level
Рет қаралды 577 М.