Profile Your Application |
|
|
|
| Written by Graham Stoney | |||
|
It's surprising how many bugs, unexpected behaviour and code inefficiencies can be found by profiling your application, and looking to see if the CPU time is being consumed where you expected. Some algorithmic bugs may simply waste resources; others reveal themselves by chewing too much CPU and then producing the wrong result. Or you may find system calls being made that you weren't expecting; it's worth finding out why there are going on. If you haven't profiled your application, chances are there are hot-spots that could dramatically improve performance by some simple optimizations. Hand-optimisations are time-consuming, so you want to focus only on the hot-spots, and you need a profiler to tell you where they are. Your strategy to get optimal performance for your precious development time should be to design your system to use an efficient architecture and efficient algorithms, code for readability, and then optimise just the hot-spots based on actual system profiling results.
|












