Performance improvement is an ongoing task, always. So a profiler is a good friend. For me, the very basic tool is timing and print functions, lol. Yes, they are. In one of language tool, it helps to identify the parsing phase takes 60~80% of the time. The granulatiry is coarse (not down to function level), but very useful. Later I introduced multithreading for parsing. It’s very useful to run one parsing thread on each CPU core.
This week, I tried 2 C++ profiler. ‘Very Sleepy’ and VS profiler. I like ‘Very Sleepy’. It helps to identify a hash table implementation in a runtime module. It is mostly from key collision, and we got significant performance improvement after tuning the codes.
For Java, last year I tried eclipse TPTP and yourkit. TPTP sucks. Yes, you wasted hours and lose patience before a running finished. Normally it takes 30+ seconds for each running. Maybe TPTP is not good at profiling a recursive-descedent parser. Then I tried yourkit and quickly identified which parser rule was causing the problem. After the fix, the time dropped from 1200seconds to ~4 seconds in doing 22 nested if-else-if-else statements. Pretty exciting profiling experience.
4 years ago we profiled a C# web app. I forgot which profiler we used. Finally we improved the performance by trade-off in UX/speed + more offline computing.
Haven’t got experience with profiler in other languages. But so many profilers, I need at least one.