Skip to content
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

How contented is new id allocation expected to be? #57

Open
terrarier2111 opened this issue Jun 16, 2023 · 3 comments
Open

How contented is new id allocation expected to be? #57

terrarier2111 opened this issue Jun 16, 2023 · 3 comments

Comments

@terrarier2111
Copy link
Contributor

There are a lot of possible optimizations on the way if we say that we expect low contention on the Mutex around ThreadIdManager, but can we make this assumption?

@Amanieu
Copy link
Owner

Amanieu commented Jun 17, 2023

Contention should be low: it only happens once per thread, and the overhead is tiny compared to that of actually creating a thread.

@terrarier2111
Copy link
Contributor Author

@Amanieu i opened a pr adjusting locking behavior in regards to this assumption

@ibraheemdev
Copy link
Contributor

In general I don't see the need for any of the write paths to be optimized given how rarely they are taken. The performance characteristics of this library are perfectly fine as it is and any increased complexity seems like a bad tradeoff.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants