You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Tells you to use const thread_locals because they offer many more performance opportunities due to not having to check for re-initialization on every call.
What it does
Tells you to use const thread_locals because they offer many more performance opportunities due to not having to check for re-initialization on every call.
See this godbolt for the potential performance impact: https://godbolt.org/z/rnPsb6Y7v
Advantage
Performance
Drawbacks
None I think? Honestly I don't understand why this is even a feature, i.e. why the compiler can't do this automatically.
Example
Could be written as:
The text was updated successfully, but these errors were encountered: