How useful is thread local storage (TLS)

This page summarizes the projects mentioned and recommended in the original post on reddit.com/r/ProgrammingLanguages

Our great sponsors
  • JetBrains - Developer Ecosystem Survey 2022
  • Scout APM - Less time debugging, more time building
  • SonarLint - Clean code begins in your IDE with SonarLint
  • Cwerg

    A light-weight compiler backend

    I am debating whether TLS should become a first class citizen in Cwerg so I have been looking into use cases. The size of the TLS segment in a typical (Linux) binary is tiny - tens of bytes - suggesting this feature is not commonly used. The primary use cases I could identify were: * improvements to memory allocation * replication of certain globals (like errno) to make them more thread friendly * integration with Restartable sequences which in turn seem to primarily benefit memory allocation

NOTE: The number of mentions on this list indicates mentions on common posts plus user suggested alternatives. Hence, a higher number means a more popular project.

Suggest a related project

Related posts