
262 CHAPTER 5 Program Design and Analysis
can increase use of page mode by rearranging your variables so that more can
be referenced contiguously.
■ Analyze cache behavior to find major cache conflicts. Restructure the code
to eliminate as many of these as you can as follows:
—For instruction conflicts, if the offending code segment is small, try to
rewrite the segment to make it as small as possible so that it better fits
into the cache. Writing in assembly language may be necessary. For con-
flicts across larger spans of code, try moving the instr uctions or padding
with NOPs.
—For scalar data conflicts,move the data values to different locations to reduce ...