[fpc-devel] Class field reordering

Jonas Maebe jonas.maebe at elis.ugent.be
Sat Jul 14 21:47:21 CEST 2012

On 14 Jul 2012, at 20:29, Nico Erfurth wrote:

> So basically, something like
> class MyClass = class
>  private
>    FHeavilyUsedValue: Boolean;
>    FAlsoHeavilyUsedValue: DWord;
>    NotOftenUsed: Byte;
> end;
> should leave the ordering of the first values alone, while optimizing
> the rest. Or at least disable reordering for the whole class.

Only the setting active at the end of the class declaration (before the "end") will have effect. The setting can be changed via {$optimization orderfields} and {$optimization noorderfields}, just like all other optimization settings.


More information about the fpc-devel mailing list