Profiling Lab

Profiling is an essential step in performing any kind of optimization. When trying to optimize performance, there is no effective technique to achieve speedup without knowing how much time is spent each region of code. In order to determine the amount of time spent in each region, we must profile the application. Although profiling is generally done to determine performance information, profiling can be used for any type of optimization, such as reducing power or energy.

In this lab, you will be using gprof in order to determine where most of the execution time is being spent in a program. Gprof is a standard GNU profiler that can be used with any application that is compiled using gcc. Once you have determined where the execution time is being spent, you must optimize the C code for the application in order to achieve a significant speedup.