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
It's not a proposal, it's more of a discussion. I found some interesting changes in the recent commit, I observed the addition of a concurrent/HashTrieMap implementation which is internal.
I think sync.Map should have better performance by way of a HashTrieMap implementation? I didn't do a full test. I just think it has a smaller lock range and doesn't look like the existing sync.Map implementation. Map, which locks the entire map during writes.
The main use case for sync.Map is to solve the problem of concurrent reads and writes. HashTrieMap is designed to be thread-safe and lock-free. So I think using HashTrieMap to implement sync.
As far as I know, there is already a community implementation of sync.Map based on the HashTrieMap implementation
Proposal Details
It's not a proposal, it's more of a discussion. I found some interesting changes in the recent commit, I observed the addition of a concurrent/HashTrieMap implementation which is internal.
I think sync.Map should have better performance by way of a HashTrieMap implementation? I didn't do a full test. I just think it has a smaller lock range and doesn't look like the existing sync.Map implementation. Map, which locks the entire map during writes.
The main use case for sync.Map is to solve the problem of concurrent reads and writes. HashTrieMap is designed to be thread-safe and lock-free. So I think using HashTrieMap to implement sync.
As far as I know, there is already a community implementation of sync.Map based on the HashTrieMap implementation
https://github.com/puzpuzpuz/xsync
(Please feel free to correct me if there are any questions, my understanding is not complete)
The text was updated successfully, but these errors were encountered: