[fpc-devel] Comparison FPC 2.6.2 - Delphi 7

Michael Schnell mschnell at lumino.de
Mon Mar 4 09:40:39 CET 2013


On 03/02/2013 04:02 PM, Florian Klaempfl wrote:
>
> In theory yes but I still fear that the threadvars and synchronization 
> eats much of the advantage in this case.
>
I suppose the (high level) synchronization will be rather complex and 
eat performance.

The low level threadvar implementation is known to be improvable. AFAIR, 
it uses library calls as well in Windows as in Linux while the 
appropriate C  compilers use segment registers (on x86 / x86-64) which 
are documented in Linux and undocumented in Windows and supposedly a lot 
faster.

OTOH, are Theradvars necessary to be used very frequently (i.e. more 
than when creating thread-specific objects, that then can be used to 
access the thread specific data) ?

-Michael



More information about the fpc-devel mailing list