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
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to