[fpc-devel] Less global variables

Hans-Peter Diettrich DrDiettrich1 at aol.com
Sat Oct 9 22:26:22 CEST 2010


Andrew Brunner schrieb:
> 2010/10/9 Adem <listmember at letterboxes.org>:
>> Would you consider turning those structured types into objects?
>>
>> Properties with getter/setter pairs would make tracing (placing a breakpoint
>> in the getter/sertter would help identify the caller) easier.
> 
> The only problem with that line of thinking is that every time your
> are calling that variable you are adding the extra steps.  This is
> impeding on performance of both compiling and maybe even execution.

Inlining the getters should not add much overhead. I don't feel that 
compilation is slower with the moved variables, on my x86 box, but 
perhaps somebody can benchmark that more precisely, and on other 
architectures.

DoDi




More information about the fpc-devel mailing list