202
January, 2004
Developer’s Manual
Intel XScale® Core
Developer’s Manual
Optimization Guide
In the data structure shown above, the fields Year2DatePay, Year2DateTax, Year2Date401KDed,
and Year2DateOtherDed are likely to change with each pay check. The remaining fields however
change very rarely. If the fields are laid out as shown above, assuming that the structure is aligned
on a 32-byte boundary, modifications to the Year2Date fields is likely to use two write buffers
when the data is written out to memory. However, we can restrict the number of write buffers that
are commonly used to 1 by rearranging the fields in the above data structure as shown below:
struct employee {
struct employee *prev;
struct employee *next;
int ssno;
int empid;
float Year2DatePay;
float Year2DateTax;
float Year2Date401KDed;
float Year2DateOtherDed;
};