Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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.



Profilers with a flame graph gets you the same information without having to do a manual search through your execution.


Yes, 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).


Iff your language has one, and it doesn't choke on the codebase...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: