I'm not programming this, but I enjoy watching your videos in support. Mainly because I'd have no idea what to do with it when done and I really don't grasp most concepts in general. Thank you for providing this free for all to see on YT.
@@RockTo11 it seems to me that you don't even understand what premature optimization means. It's not about profiling, it's about writing sane optimal code in the first place instead of giving preference to "readability". And after 8 years of software engineering, 6 years of AAA game dev and 2 years of game engine programming, I'm saying, that you should not waste time on performance research for a system in such an early days of it's life
Please be aware that when rendering the profile results you are using strcat with a null terminated const char* so you don't know the size of the string and you're using a rather small buffer of 50 characters so this is likely to cause a buffer overflow! Not safe code to be using, please be aware of how you're using string data in C / C++. C++ has ways around this instead of using old C functions or if you're going to use this sort of code at least do an assert on the strlen of your result.Name, any client code isn't going to be aware necessarily that there is a 50 character limit - the "%.3fms ". You could check this at compile time since you are using a const char*.
Amazing to see a simple 'profiler' class for functions. I played with it myself and have a imgui log window. Could you not tie it together with the spdf logger? I have created two sinks one for the console and one for the imgui renderer. therefor you can also capture the log level and stuff and display colors based on the types =D ? Also how are you planning to handle events?
Useful for ballpark benchmarks, certainly. I would guess though that for actual profiling with hardware performance counters, you would just use a profiler and not build it into the framework/engine?
He knows, he even made a video about it in C++ series, and he's been using it much before C++17, he mentioned it. He's professional game engine developer fam.
@@PrinceGupta-jo8lo he's hardly "professional", he just goofin with an audience that knows less than he does, he makes seriously unprofessional mistakes and that's just from watching "blips" of his stuff. Good talker though..
@@gregd6022 Well he used to be a "professional" game engine dev at EA. Maybe you're just better than him, it's totally possible but his videos have good insights, and his hazel-dev is also no joke
I'm not programming this, but I enjoy watching your videos in support.
Mainly because I'd have no idea what to do with it when done and I really don't grasp most concepts in general.
Thank you for providing this free for all to see on YT.
The wait has come to an end once again. Thank you so much!
We are one piece closer to finishing the puzzle amirite?
"Renderer Draw" is not measuring the actual draw time, right? it is measuring the time it takes to send the all the draw commands to the gpu.
Yup. If you wanna profile GPU rendering use NSight or Renderdoc.
@@yasserarguelles6117 Check his latest video about vulkan, he mentioned your comment
Always wanted something like this! :)
21:28
you could also explicitly specify the type in the lambda call
What a clever usage of a destructor :D
Good to see you again......... Your videos are really awesome........
Thanks for sharing your knowledge man :)
Good to see you again +1
Engine: Not even close to exist yet...
Cherno: Lets optimize it!
and its been like a year lmao :D
You should always optimize
@@fossforever512 no, you should not
Yes, you should always optimize. The "premature optimization" preacher brigade are a major reason why we have such slow software these days.
@@RockTo11 it seems to me that you don't even understand what premature optimization means. It's not about profiling, it's about writing sane optimal code in the first place instead of giving preference to "readability". And after 8 years of software engineering, 6 years of AAA game dev and 2 years of game engine programming, I'm saying, that you should not waste time on performance research for a system in such an early days of it's life
thanks!
Please be aware that when rendering the profile results you are using strcat with a null terminated const char* so you don't know the size of the string and you're using a rather small buffer of 50 characters so this is likely to cause a buffer overflow! Not safe code to be using, please be aware of how you're using string data in C / C++. C++ has ways around this instead of using old C functions or if you're going to use this sort of code at least do an assert on the strlen of your result.Name, any client code isn't going to be aware necessarily that there is a 50 character limit - the "%.3fms ". You could check this at compile time since you are using a const char*.
Amazing to see a simple 'profiler' class for functions. I played with it myself and have a imgui log window. Could you not tie it together with the spdf logger? I have created two sinks one for the console and one for the imgui renderer. therefor you can also capture the log level and stuff and display colors based on the types =D ? Also how are you planning to handle events?
Can you make a video about callbacks in C++?
👑
Useful for ballpark benchmarks, certainly. I would guess though that for actual profiling with hardware performance counters, you would just use a profiler and not build it into the framework/engine?
Why are you taking an rvalue reference and copy the lambda though... You should probably move it into the timer.
Does the Cherno not know about string_view? It was added to std in C++17, but there have been library versions floating around for years earlier.
He knows, he even made a video about it in C++ series, and he's been using it much before C++17, he mentioned it. He's professional game engine developer fam.
@@PrinceGupta-jo8lo he's hardly "professional", he just goofin with an audience that knows less than he does, he makes seriously unprofessional mistakes and that's just from watching "blips" of his stuff. Good talker though..
@@gregd6022 Well he used to be a "professional" game engine dev at EA. Maybe you're just better than him, it's totally possible but his videos have good insights, and his hazel-dev is also no joke
Takes an rvalue reference in constructor then copies it :(
Cherno is from australia or germany?, where he lives?, it is english his native language?
It's indeed an Australian accent.
His name sounds very slavic though, Yan Chernikov