-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Windows: use __declspec(thread) TLS implementation, it is MUCH faster… #21810
Conversation
… than _Thread_local [backport]
Thanks for your hard work on this PR! Hint: mm: orc; opt: speed; options: -d:release |
Why did you change it to use For me EDIT 2: apparently gcc does not support native TLS on Windows at all (https://gcc.gnu.org/bugzilla/show_bug.cgi?id=80881), though atleast clang does, so I guess I have to stick with it. |
I tried clang but even "hello world" crashes with clang on Windows for me. Which clang do you use? I'm willing to change the default C compiler that we ship with Nim if this finally solved this madness. |
I'm using the one from msys2. While I like its integrated model with its package manager and closed environments, it's probably not for everyone. One thing of note is that for TLS to work it's mingw clang environment has to be used, as in the default mingw x64 environment all the libraries (and clang) are compiled with gcc, so TLS emulation is used everywhere. |
nim-lang#21810) * Windows: use __declspec(thread) TLS implementation, it is MUCH faster than _Thread_local [backport] * Update lib/nimbase.h * better fix
nim-lang#21810) * Windows: use __declspec(thread) TLS implementation, it is MUCH faster than _Thread_local [backport] * Update lib/nimbase.h * better fix
nim-lang#21810) * Windows: use __declspec(thread) TLS implementation, it is MUCH faster than _Thread_local [backport] * Update lib/nimbase.h * better fix
… than _Thread_local [backport]