2009年1月29日 星期四

Naturally Aligned

http://msdn.microsoft.com/en-us/library/ms253949(VS.80).aspx

A datum is called naturally aligned if its address is aligned to its size, and misaligned otherwise. For example, an 8-byte floating-point datum is naturally aligned if the address used to identify it is aligned to 8.


http://www.ae.utexas.edu/lrc/fortran/intel/f_ug2/prg_algn.htm
For optimal performance, make sure your data is aligned naturally. A natural boundary is a memory address that is a multiple of the data item's size. For example, a REAL (KIND=8) data item aligned on natural boundaries has an address that is a multiple of 8. An array is aligned on natural boundaries if all of its elements are.
All data items whose starting address is on a natural boundary are naturally aligned. Data not aligned on a natural boundary is called unaligned data.

沒有留言: