Performance Profiling

There are various tools which can do this, but they are platform-specific. Instruments on macOS and valgrind on Linux would be places to start looking.

Again, this is linked to the platform (or compiler). gperf is fine with GCC or Clang AFAIK.

It looks like there’s a .pc file for gperftools. I would recommend using FindPkgConfig to find and use it.