In summary: for performance comparisons, compile your programs using
gcc -Wall -O2 -mcpu=ultrasparc ...
The transformations applied to improve performance must satisfy the following criteria:
Typically, the justification for a series of performance-improving transformations will be turned in along with the improved programs, e.g., as a README file (or as required by the assignment spec). Note that a particular transformation may cause changes to more than one place in the program, e.g., replacing a linked list data structure by a hash table; the point is that for a particular transformation, all of the changes are related to a single conceptual change you are making to your code. For each program, the README file should document the entire sequence of changes you made, in each case giving profile data to identify the performance problem, describing the change you made to address the problem, and describing the extent of performance improvement achieved as a result. Thus, if the final version of your program required five different transformations to your code, your README file will contain five different sets of justification; each of them will contain profile data, a description of the transformation, and its effect on performance.
Transformations that involve space-time tradeoffs are OK, provided that the additional space requirements are kept ``reasonable.'' For the sake of simplicity, I will consider any space increase of upto 4 KB for any particular program ``reasonable.'' It is possible that, depending on the program, larger space increases may be reasonable: please check with me ahead of time if you need more than 4 KB of extra space.
Since the actual runtime obtained can vary depending on the system load, we will try to ensure that your program is running under similar conditions to the ``baseline'' program it is being tested against as follows: the programs will be run alternately, i.e., your program, then the baseline, then your program, then the baseline, and so on. The idea is that if the system load happens to be high, then both your program and the baseline will be affected similarly by this.