In this abstract recipe, we will talk about the steps required to optimize software.
Perform the following steps to learn about the optimization process that we will be employing:
Establish the baseline performance of your existing code in terms of the relevant parameters (execution time, memory consumed, peak I/O bandwidth, and so on).
Determine the performance targets or system constraints. One of the seven habits of highly effective people was to always start with the end in mind, and optimization is no different. How quickly must the code get executed? What is the longest acceptable time to complete the processes? What is the maximum amount of memory that can be consumed by your software? How accurate must the computed results be? Don't forget about the fidelity of the results.
Set up a development and measurement environment that allows you to easily and rapidly measure and record the relevant performance characteristics. The easier it...