-
Notifications
You must be signed in to change notification settings - Fork 544
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
concurrent-map key interface{} support #55
Comments
Hi @ross-oreto You have a point there. There is obviously a trade-off between allowing arbitrary key types to the map's performance, and perhaps a usability issue as well (it may be annoying to type convert). Would be interesting to benchmark such an implementation. Would be cool if you could try to make this change on your own dev branch and benchmark it. If you end up doing so please update. Otherwise I'll leave this hanging for a while and close it. |
Baseline: with interface{} key: |
Would it be more feasible to implement this now with support for generics? |
@ross-oreto |
I made changes locally necessary to use the interface key and ran those benchmarks, however I did not push my changes. |
Enhancement:
If concurrent-map is supposed to behave the same as the plain map, then the allowed key types should be the same and the type map[interface{}]interface{} should be supported.
The text was updated successfully, but these errors were encountered: