LLVM and TLS

Kai Nacke via digitalmars-d-ldc digitalmars-d-ldc at puremagic.com
Tue Feb 17 14:50:27 PST 2015


Hi Jonathan!

On Tuesday, 17 February 2015 at 02:41:12 UTC, Jonathan Marler 
wrote:
> I've noticed that on my windows 7 development machine, 
> switching between TLS and non-TLS storage has a minimal impact 
> on performance (when using DMD).  I haven't tried LDC yet, 
> however, on a macbook pro, which uses clang (LLVM) for the 
> linker, using TLS has a huge performance impact (much much 
> slower).  Does anyone know if this is because of the way LLVM 
> handles TLS storage?  I'll have to try using LDC on my windows 
> machine but maybe one of you know off hand whether or not LLVM 
> has some performance problems with TLS storage. Thanks!

On Windows, LLVM uses the segment registers for TLS storage (gs: 
for 32bit and fs: for 64bit). There is no other impact.

Regards,
Kai


More information about the digitalmars-d-ldc mailing list