4 ms·
I often test out things like this by completely disabling components. It's one way of measuring, and can really help narrow things down in larger programs. i.
by justinsaccount 8y ago
I often test out things like this by completely disabling components.
It's one way of measuring, and can really help narrow things down in larger programs.
i.e., pipeline takes 300s to run. Suspect the final output may be worth profiling and optimizing. Stick a 'return' at the top of the output function and see the pipeline now takes 295s to run. Conclusion: final output not the problem.
- monocasa 8y agoProfilers with a flame graph gets you the same information without having to do a manual search through your execution.
- BeeOnRope 8y agoYes, although it's not exactly the same because there can cross-cutting effects where the behavior of one function affects another. For example, one function thrash the cache, which ends up greatly slowing down a second function. If you remove the first function entirely (comment it out, etc), the change will reflect that, but a flame graph won't (since it only shows the actual runtime for the second function: it has no way to determine how much impact it is having on other functions indirectly).
- TeMPOraL 8y agoIff your language has one, and it doesn't choke on the codebase...