Instrumentation | Game Engine series

  Рет қаралды 20,270

The Cherno

The Cherno

Күн бұрын

Пікірлер: 30
@on-hv9co
@on-hv9co 5 жыл бұрын
To reduce your calc time on transformations create the local trans variable first then pass it along in calcuations: glm::mat4 trans = glm::mat4(1.0f); trans = glm::fucntion(trans,data) * glm::function(trans... I found this helped when I was moving 100's of objects in my engine and was hitting some insane lag
@vosureLife
@vosureLife 5 жыл бұрын
You are so strong Cherno, i wanna be like you. Cool programmer and cool guy. Great video and great explanation as usual.
@simonbaxter8001
@simonbaxter8001 5 жыл бұрын
How much performance hit does the actual instrumentation add? Especially if your adding string formatting as you add parameter values and there is the time it takes to physically write the performance data to file (assuming it in the same thread!). i.e the 'Uncertainty Principle' or 'Observer Effect' !
@omegakiller1495
@omegakiller1495 5 жыл бұрын
i am thinking that too
@tehLyrex
@tehLyrex 5 жыл бұрын
Introducing any kind of profiling, even when optimally implemented, causes in debug a (relatively) huge performance hit - even more when it's profiling functions in the hot patch (which you're mostly doing).
@simonbaxter8001
@simonbaxter8001 5 жыл бұрын
I was thinking that this type of profiling is good for doing relative performance testing and optimization, but you can't use it for absolute measurement. Saying that, it may be that the 'slow' modules/functions maybe slow because they are instrumentated. i.e a function that writes to the GPU may only be a few instructions. Once instrumentated, it becomes 10's or 100's of instructions, so the actual thing your measuring becomes a tiny percentage of the timed measurement! I guess like all things, you need to use these kind of methods sparingly and have an true understanding of what the measured data really means!
@0x356
@0x356 5 жыл бұрын
Wait, we need to profile the profiler! Seriously though, yes, it does add some impact. In most cases the strings are just shallow copies of a pointer to static data - so its pretty quick. If you start doing formatting of parameters though, or "processing" of the string to strip out "cdecl" or whatever, then the impact will be much much bigger. In my project I have preferred to use FUNCTION over FUNCSIG (so that I don't need to do any processing to remove the slightly ugly cdecl, and also results in smaller .json files. I use the funcsig variant only if I have a specific need to (like, I know the function is overloaded).
@Pinipon.Selvagem
@Pinipon.Selvagem 2 жыл бұрын
It adds alot of overhead, since on each profiling, it is writing to a file instead of caching it or something. I added a in engine Profiler window using ImGui, to display this information. From my testing: - using TheCherno Instrumentator that writes to a file, Sandbox2D::OnUpdate took me around 0.471 ms - using my in engine Profiler viewer that does not write to a file, Sandbox2D::OnUpdate took me around 0.257 ms Those gaps you see between "OrthographicCameraController:OnUpdate" and "Renderer Prep" are mostly IO (writing to the file), since on my Profiler in engine viewer you can hardly see the gaps.
@Fobber92
@Fobber92 5 жыл бұрын
Great video, very insightful and such a useful tool
@hman2875
@hman2875 5 жыл бұрын
Hey, I wonder if you'll ever do Vulkan tutorials.
@tarheel23jump
@tarheel23jump 2 жыл бұрын
Mentioned fixing the timer multiple times but didn’t. Is it addressed in another video, if so which one?
@smestre
@smestre 5 жыл бұрын
Hello there! In your game engine series it seems like you very much "buy into" the modern C++ style. This does not seem to be the case for most game devs I know of (Jonathan Blow comes to mind), as they seem to favor a more barebones, C-like, style Why do you think that is? What are the merits of each style?
@joestevenson5568
@joestevenson5568 5 жыл бұрын
Performance vs safety.
@RafaelCamposNunes
@RafaelCamposNunes 4 жыл бұрын
@@joestevenson5568 this might not be the case for everything, as the guidelines for the standard C++ is zero overhead in execution. There are some containers and types that don't follow strictly (std::string comes to my mind) but in the end is about how much do you know C++ to know where the bottleneck in memory/cpu/gpu might be. Safety doesn't necessarily come with a time overhead when executing your software on C++. One area you can see this is the FILE* vs fstreams or templates for that matter, although the latter comes with a compilation time overhead.
@sam_is_people1170
@sam_is_people1170 3 жыл бұрын
thanks!
@dkthehunter596
@dkthehunter596 4 жыл бұрын
I set up instrumentation on a couple of the Tests from many videos ago in this series. (The Test interface; onUpdate onRender onImGuiRender; using ImGui TestMenu to select between tests). Essentially, my measurements say that it takes 30-40 ms to create each Test. That's to create it. To construct it. That seems like a long time considering the size of the Test objects. Basically two frames to make one relatively small object. Is this 30-40 ms measurement reasonable?
@Rodrigo-dx4pm
@Rodrigo-dx4pm 5 жыл бұрын
What is the name of the song that plays at the end of the video, somebody could tell me?
@Rodrigo-dx4pm
@Rodrigo-dx4pm 5 жыл бұрын
Thank you.
@bidkonic
@bidkonic 4 жыл бұрын
@@Rodrigo-dx4pm You are welcome.
@akuma0009
@akuma0009 5 жыл бұрын
Would you please do a tutorial explaining what’s CMake for beginners .
@omegakiller1495
@omegakiller1495 5 жыл бұрын
Great video. Thanks. you are awesome
@minhphuochong1185
@minhphuochong1185 4 жыл бұрын
There is a big difference between the "Intro to profiling" video and this video. Maybe there is a instrument preparation video or something like that. Is that right?
@supremedeity9003
@supremedeity9003 4 жыл бұрын
there is a video before this one not added in the playlist.
@manhpham3917
@manhpham3917 5 жыл бұрын
great
@sahilbaori9052
@sahilbaori9052 5 жыл бұрын
At first, I thought my video was running on 1.5x
@nauq302
@nauq302 3 жыл бұрын
Is __PRETTY_FUNCTION__ better then __FUNCSIG__?
@QRebound
@QRebound 5 жыл бұрын
25:42 That's half a millisecond, not 510 ms ;) Or 498ms of wall time, of course.
@younlok1081
@younlok1081 5 жыл бұрын
can u do a small game tutorial just a simple 2d game with any library
@drumilsevak2027
@drumilsevak2027 5 жыл бұрын
Bruh
Intro to Profiling | Game Engine series
24:54
The Cherno
Рет қаралды 27 М.
Visual Profiling | Game Engine series
28:46
The Cherno
Рет қаралды 25 М.
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН
Beat Ronaldo, Win $1,000,000
22:45
MrBeast
Рет қаралды 158 МЛН
Writing Code That Runs FAST on a GPU
15:32
Low Level
Рет қаралды 574 М.
Weak Pointers in C++ (std::weak_ptr)
17:25
The Cherno
Рет қаралды 61 М.
choosing a game engine is easy, actually
15:08
samyam
Рет қаралды 650 М.
Refs, Scopes and Smart Pointers | Game Engine series
24:55
The Cherno
Рет қаралды 36 М.
Emulating a CPU in C++ (6502)
52:28
Dave Poo
Рет қаралды 1 МЛН
Locknote: Local Reasoning in C++ - Sean Parent - NDC TechTown 2024
1:09:13
NDC Conferences
Рет қаралды 2,2 М.
C++ 3D MULTIPLAYER GAME FROM SCRATCH // LIVE TUTORIAL
2:28:10
The Cherno
Рет қаралды 21 М.
Faster than Rust and C++: the PERFECT hash table
33:52
strager
Рет қаралды 613 М.
Object Validation and Invariants End at This Point
9:57
Zoran Horvat
Рет қаралды 4,5 М.
Resizing | Game Engine series
30:53
The Cherno
Рет қаралды 24 М.
The Best Band 😅 #toshleh #viralshort
00:11
Toshleh
Рет қаралды 22 МЛН