This is important because a long integer on the proper boundary can be moved with one instruction where a long integer that straddles the boundary will require three instructions since memory is only really accessed on even boundaries, then the pieces are combined to reassemble the two parts. This example properly directs the compiler to find an even boundary, then mistakenly misaligns the variables by placing a 2 byte variable first and following it by a 4 byte variable. This is much better. For maximum speed, tell the compiler to allocate variables on a doublelong word boundary. Our perfectly aligned variables in the previous example are misaligned by the misplaced short Variable.
Floats work best on long word boundaries.
The following code would execute faster. All internal operations are done in double precision math. This is true for 68K and PPC math. So it is faster to use double precision floats than single precion since there is no need for internal conversion. Avoid mixing integers with floats in an equation since each integer must be converted to a float before it is used.