[fpc-devel] Comparison FPC 2.6.2 - Delphi 7

Michael Van Canneyt michael at freepascal.org
Mon Mar 4 09:49:01 CET 2013



On Mon, 4 Mar 2013, Michael Schnell wrote:

> 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.

The "(on x86 / x86-64)" disqualifies your argument for use. 
The solution must work on ALL platforms...

BTW. threadvars in FPC are done in the same way as in Delphi, with TLS.

Michael.



More information about the fpc-devel mailing list