Cpp, Debugging, Profiling, Programming, Technology.
information: g++ -pg -o compute compute.cpp Run the program to generate the profiling data: ./compute Analyze the profiling data with gprof: gprof ./compute gmon.out > analysis.txt The analysis.txt file will contain the profiling report. Here is an example of what you might see in the flat profile