-
Notifications
You must be signed in to change notification settings - Fork 17.7k
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
proposal: sync.Map: generic sync.Map version #69027
Comments
I don't see a proposal here. Are you asking a question? Questions and discussions in general are better handled in a forum such as golang-dev. See https://go.dev/wiki/Questions. Thanks. Yes, the generic approach can be faster in some cases, because it can reduce the overhead required for interface boxing and interface method calls. I'm going to close this issue. Please comment if you disagree. |
Also, duplicate of #47657 |
I understand benefits of generic Vs interface. Question arises only
because, I don't understand why not implement it if it gives such boost
without drawbacks
…On Fri, Aug 23, 2024, 01:22 Frederik Zipp ***@***.***> wrote:
Also, duplicate of #47657 <#47657>
—
Reply to this email directly, view it on GitHub
<#69027 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZCUDGQ34MDUYYXSY2ALXLZSZQBLAVCNFSM6AAAAABM66JSXGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBVHA2DQMBYGI>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Ok, sorry I made you think it's proposal to "simply change code"
…On Fri, Aug 23, 2024, 01:41 Ian Lance Taylor ***@***.***> wrote:
Because simply changing the code would not be backward compatible, and
would break existing users. See issues #47657
<#47657> and #48287
<#48287>.
—
Reply to this email directly, view it on GitHub
<#69027 (comment)>, or
unsubscribe
<https://github.com/notifications/unsubscribe-auth/AAZCUDEF6SMQDQ65ESA4223ZSZSJPAVCNFSM6AAAAABM66JSXGVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDGMBVHA3DONBSG4>
.
You are receiving this because you authored the thread.Message ID:
***@***.***>
|
Apologies if I'm misunderstanding. In any case, as I said above, discussions should take place on a forum. Thanks. |
Proposal Details
I've tried to implement generic version of sync.Map and tests shows significant performance improvements
The test are passed. I'm not sure, could such a boost be caused only by generic approach without changing the underlying logic?
https://github.com/Gaudeamus/syncMapGeneric
The text was updated successfully, but these errors were encountered: