On Thu, 25 Mar 2010, Szak�ts Viktor wrote:

Hi,

> >> Is there a way to turn inline ASM stuff on?
> >> (sacrificing Win9x compatibility)
> >> I'd make a test with it to see the diff.
> > I also do not now it they will work with Win64. Probably not though
> > we can update then for 64 bit mode (here Win9x is not a problem at all :))
> That's right, I forgot it for an instant :)
> BTW, we can also enable it for MSVC 2008 and upper (32-bit), 
> since they don't support Win9x anymore.

I suggest to start with small test to check the code produced by
MS for thread local variables. Knowing MS I will not be very surprised
if it's already well tuned code which does not call internally TlsGetValue()
at all so there is not place for noticeable improvement.
I think that we need Mindaugas help here. In the past he checked
code generated by BCC and created ASM inline macros for BCC builds.
The MinGW inline ASM function I added later is only translation of
initial Mindaugas code.
Mindaugas any chance that you can check the code generated by MSVC
which access thread local variables for wi...@32 and Win64?

> > Try to recompile Harbour with HB_USER_CFLAGS=-DHB_USE_TLS and check
> > the results. Maybe I will not have to touch this ASM code at all :)
> Tried it with mingw 4.5.0 and got 33s, so the speed halved.
> Strange to me.

Similar to my old tests :(
It means that this part is still not improved in MinGW.
The results are not such amazing. MinGW GCC was using for thread
local variables calls to TlsGetValue() without any optimization
or inlined code and probably internal optimization logic was not
updated to mark access to such variables as very expensive.

best regards,
Przemek
_______________________________________________
Harbour mailing list (attachment size limit: 40KB)
Harbour@harbour-project.org
http://lists.harbour-project.org/mailman/listinfo/harbour

Reply via email to