Hacker News new | ask | show | jobs
by cornel_io 1417 days ago
Try to profile the code and see where it's spending time.

Get a good flame graph up, and you'll have a really solid visual representation of what's going on.

Bonus: on almost any project, nobody has done a profiling pass in at least a few months, so you'll probably discover some extremely easy performance improvements and you'll look like a goddamn hero when you speed up e.g. the test suite by a factor of 3 in your first week on the job.

3 comments

Hey, I'd like to get a grasp of how to do what you're explaining, would you have any link or resource by chance? thanks!
This is my favourite explanation of flame graphs: https://rbspy.github.io/profiling-guide/using-flamegraphs.ht...
Good resource! Alas, the specifics really depend on the language.
Definitely a good advice. Profiling is something I haven't looked into and should be after debugging.
I did this and flamegraphs in Rust are not great due to rayon :(