4 ms·
I mostly use GUI-based debuggers (and profilers), but even in this case I found it often useful to pause the program at random times when it appears "stuck". M
by omgtehlion 2y ago
I mostly use GUI-based debuggers (and profilers), but even in this case I found it often useful to pause the program at random times when it appears "stuck".
Most of the time I don't event need to reach for a profiler proper.
- 082349872349872 2y agoRandom sampling is not only useful for quick and dirty debugging, but also for engineering nuclear bombs: https://en.wikipedia.org/wiki/Metropolis–Hastings_algorithm#History https://en.wikipedia.org/wiki/Metropolis–Hastings_algorithm#...
- kragen 2y agofew phenomena in daily life are either quicker or dirtier than a nuclear bomb
- mananaysiempre 2y agoOf course, a lot of that old neutron transport work is now used for ray tracing in cinema production. Metropolis (and MCMC is general) is one, and I also remember some sort of volumetric scattering thing as well.
- olvy0 2y agoYes, exactly, I do this all the time. Only after having exhausted this, which I consider to be the low-hanging fruits of performance gains, do I start profiling code with an actual profiler.