Casey is trying/experimenting with things he doesn't know, so don't treat his solution as a perfec…
Basically that inline calculated the whole loop at compile time and replaced with the result? yes,…
Thanks for explanation. Basically that inline calculated the whole loop at compile time and replac…
Inlining is about extra optimizations compiler can potentially do. Often that allows to remove lar…
if code you call is really performance critical, you actually don't want any call at all, you want…
5 years later, I found this video which I think is incredibly illustrative, basically explaining t…
In the code of the PID camera on Day 504 ( ), it seems that Casey is doing an analytic integration…
Theoretically having function in one copy should be faster, because that will use less space in co…
OK makes sense. And what about the performance? Would having copies of the same functions be actua…
Sry Im dumb and didn't click godbolt, now I just learned that that is actually a block scoped thin…
Think of S in my code example as timed_block. TIMED_BLOCK macro expands to timed_block var(args...…
Sure this will happen for void f(), but why would it happen for any of the curly braced TIMED_BLOC…
It's fine to use headers if you want to use headers. There's nothing wrong with it. What I was say…
That's how destructors work - objects that go out of scope call destructor when object is released…
First of all you should forget about "header" files or #include's. For compiler they do not exist.…
Ok gotcha, thanks Martins. Just having scope closing bracket } will automatically close timed bloc…
That's a mistake in code during editing/refactoring. This macro is not used anymore. Before it had…
Ability or desire to inline function or not compiler decides on its own regardless of inline or st…
I'm a bit surprised this thing can be done like in handmade_debug_interface.h, I've never seen thi…
For the colors, you just need to type the language name just after the 3 back quotes without space…
A static variable in a class or struct is accessible as long as you know the definition of the cla…
This works because Casey uses this variable in a single translation unit. Hmm ok, but then global …
Was typing out a response but Mrmixer already beat me to it lol.
This works because Casey uses this variable in a single translation unit. Handmade hero is compile…
Yeah that part I think is clearer to me, but how can he declare/init a static loose in a header fi…
I believe that means that all calls of that function will have the same FailCounter variable as if…
In one of the vids Casey mentions that static in C++ really has more than one meaning. Then in han…
How can I find a planar embedding of a graph and draw it on a grid? I've tried to read some papers…