Commenly, software optimization is done at end of software development process with whatever time remains. Waiting to end to start optimizing an applications makes it much more difficult to get great performance improvements.
So to make sure that your application is complete and runs with expected performance, the performance of an application should be specified in design documents so that programmers know the goal before they start programming.
The Software Optimization process:- It is an iterative process. The first step is to identify the hotspots or the area of the application that are consuming the majority of time. An investigation is then conducted on hotspot to determine its cause; slow memory accesses, inefficient algorithms, high loop counts, branch prediction problems and slow instructions etc. Once you know the cause of the hotspot, a solution can be designed and implemented.
Since not all changes result in performance improvements, the benchmark is used to verify that performance was improved as a result of the implemented changes.
Hotspots:-
Hotspots are the area of application that have intense activity. Intense activity usually refers to time, but the definition can include anything, such as mis-predicted branches or cache misses for example. While measuring the performance, time is always the priority but sometimes number of cache line is important to reduce cache misses.
Performance issuse:-