Desktop Tools and Development Environment Previous page   Next Page

What Is Profiling?

Profiling is a way to measure where a program spends its time. Using the MATLAB Profiler, you can identify which functions in your code consume the most time. You can then determine why you are calling them and look for ways to minimize their use. It is often helpful to decide whether the number of times a particular function is called is reasonable. Because programs often have several layers, your code may not explicitly call the most time-consuming functions. Rather, functions within your code might be calling other time-consuming functions that can be several layers down in the code. In this case it is important to determine which of your functions are responsible for such calls.

Profiling helps to uncover performance problems that you can solve by

When you reach the point where most of the time is spent on calls to a small number of built-in functions, you have probably optimized the code as much as you can expect.


Previous page  Profiling for Improving Performance Profiling Process Guidelines Next page

© 1994-2005 The MathWorks, Inc.