3 ms·
> On some processors, the addressing of a member is more efficient if its distance from the beginning of the structure is less than 128 bytes. > In the first e
by shakna 10y ago
> On some processors, the addressing of a member is more efficient if its distance from the beginning of the structure is less than 128 bytes.
> In the first example, to address the d and i fields using a pointer to the beginning of the structure, an offset of at least 400 bytes is required.
> Instead, in the second example, containing the same fields in a different order, the offsets to address d and i are of few bytes, and this allows to use more compact instructions.