Conduct performance analysis

In any complex system (any program longer than three lines), it's not possible to completely determine its behavior a priori. To solve performance problems you need hard data. Informed speculation is useful, but your most valuable tool is empiricism. Measure your code to find out what's happening. In addition to the standard performance tools (PC sampling and call tracing), there are some other tricks you can use.

One technique that has worked well in the Taligent Application Environment is to take things out one by one. Set up a timing harness for the code in question; then remove pieces of the computation one by one. This can be very helpful in pinning down where the time is going, something you can't always tell from other techniques. For example, when Taligent engineers worked on the View system, they thought it spent a lot of time in one loop. They put return in front of the loop. The code no longer worked correctly, but it was possible to tell how much time it spent in the loop.


[Contents] [Previous] [Next]
Click the icon to mail questions or corrections about this material to Taligent personnel.
Copyright©1995 Taligent,Inc. All rights reserved.

Generated with WebMaker