Remix.run Logo
▲ sgerenser 2 hours ago

When I worked at Microsoft, I found a particular hot function using flame graphs in a C++ application covering roughly 50% of all call paths in some runs. It was the constructor for a hand-rolled map-like data structure that was used all over the app. Switching to IIRC an abseil hash map cut the overhead by something like 98%. The app was a simulation-type thing that ran on a server for millions of cycles and runs dropped from something like 2 hours to 1 hour, as you’d expect.

Unfortunately since then most wins haven’t been nearly as dramatic, but still a happy user of flame graphs.

▲Sesse__ 33 minutes ago | parent [-]

Do you really need flame graphs for that? Wouldn't any normal profiler tell you if a function and its children used 50% of your CPU?

I always struggle to see why people think flame graphs are so great, but I'm not sure if people are comparing them to a normal (non-graphical) profile or not.