The code should also be profiled to highlight inefficiencies and to achieve maximum performance. Suitable libraries here are most likely [gprof](https://sourceware.org/binutils/docs/gprof/).