-
Notifications
You must be signed in to change notification settings - Fork 156
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
singleflight: increase concurrency efficieny of dochan #27
base: master
Are you sure you want to change the base?
Conversation
…gnificant improvement on the DoChan method
This PR (HEAD: ee123ad) has been imported to Gerrit for code review. Please visit Gerrit at https://go-review.googlesource.com/c/sync/+/632095. Important tips:
|
Message from Gopher Robot: Patch Set 1: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/632095. |
Message from Gopher Robot: Patch Set 1: Congratulations on opening your first change. Thank you for your contribution! Next steps: Most changes in the Go project go through a few rounds of revision. This can be Please don’t reply on this GitHub thread. Visit golang.org/cl/632095. |
Message from Xiyang Jiang: Patch Set 1: Code-Review+1 Please don’t reply on this GitHub thread. Visit golang.org/cl/632095. |
Message from Alan Donovan: Patch Set 2: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/632095. |
Message from Xiyang Jiang: Patch Set 3: (2 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/632095. |
Message from Alan Donovan: Patch Set 3: Hold+1 (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/632095. |
Message from Xiyang Jiang: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/632095. |
Message from Alan Donovan: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/632095. |
Message from Xiyang Jiang: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/632095. |
Message from Alan Donovan: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/632095. |
Message from Xiyang Jiang: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/632095. |
Message from Robert Findley: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/632095. |
Message from Alan Donovan: Patch Set 3: (5 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/632095. |
Message from Alan Donovan: Patch Set 3: (1 comment) Please don’t reply on this GitHub thread. Visit golang.org/cl/632095. |
Message from Ian Lance Taylor: Patch Set 3: (5 comments) Please don’t reply on this GitHub thread. Visit golang.org/cl/632095. |
In Singlelight, the function of mutex is to protect the atomic access of critical resources in the map. In the following optimization, after deleting the key of the map, the mutex can be released without being responsible for each chan
Benchmark code
Before optimization
After optimization
summary
Overall, this has a significant performance improvement for singlelight, with an average decrease of about 15% in time overhead