When the bottleneck is localized, optimization usually starts with a rethinking of the algorithm used in the program: more often than not, a particular algorithm can be specifically tailored to a particular problem, yielding better performance than a generic algorithm.
Optimization usually starts with a rethinking of the algorithm. This algorithm is used in the program. The bottleneck is localized. A particular algorithm can be specifically tailored to a particular problem. This was more often than not. A particular algorithm was yielding better performance than a generic algorithm. This was more often than not.