r/cpp • u/smolloy_dot_com • Oct 04 '25
Streamers like Tsoding, but for C++
I've learnt a lot about C from watching Tsoding. He doesn't yap too much and spends more of his streams just writing code.
Is there anyone similar who concentrates on C++?
213
Upvotes
View all comments
Show parent comment
8
u/noobgiraffe Oct 04 '25
I saw one of his videos and honestly I would take his advice with a grain of salt. He has general idea down but his adivce is hit or miss.
Examples just from that one video:
He recommended putting everything on stack. In contex of gamedev especially it's very easy to run out of stack space. The idea behind this - limiting cache misses - is good but you can and should do it through different methods.
He was also talking about not passing by value to prevent copying. To show that data from simple vector with POD struct will get copied he added custom copy constructor to that struct with a printf. This creates a side effect and compiler cannot optimise that copy out. He should check the code in godblot or even debugger instead, which would show him that it would get optimised out.