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

Reference count as a first class type #1408

Open
gdamore opened this issue Jan 17, 2021 · 0 comments
Open

Reference count as a first class type #1408

gdamore opened this issue Jan 17, 2021 · 0 comments

Comments

@gdamore
Copy link
Contributor

gdamore commented Jan 17, 2021

We use atomics for reference counts -- especially e.g. on messages were we need to know if the message is held exclusively or not. Testing this currently is done using an atomic. However, in the case where the message is not shared, an atomic operation or barrier is not needed. As this sometimes occurs in hot code paths, it might be nice to make reference counts a first class data type, and support just a local variable read if the reference count is <= 1.

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

No branches or pull requests

1 participant