So this was only a MSVC bug? Most people compile Pd with MinGW, which would explain why we never ran into this issue.
Do you happen to have a link to the original MSVC bug report (i.e. the wrong thread locals, not the performance regression)?
Do you happen to have a link to the original MSVC bug report (i.e. the wrong thread locals, not the performance regression)?
https://learn.microsoft.com/en-us/cpp/overview/cpp-conforman...
and also the implementation in "clang" (for "clang-cl" being conformant with MSVC) - https://reviews.llvm.org/D115456#3217595
then last year clang-cl also added ways to disable this (if need to), probably this hit some internal issue and had to be resolved. Maybe "thread_local" have become more widely used (unlike OS specific "TlsAlloc")