Skip to content

Use getOrPut for add - #31

Open
PauSolerValades wants to merge 4 commits into
deckarep:mainfrom
PauSolerValades:enhanced-add
Open

Use getOrPut for add#31
PauSolerValades wants to merge 4 commits into
deckarep:mainfrom
PauSolerValades:enhanced-add

Conversation

@PauSolerValades

Copy link
Copy Markdown
Contributor

Hello! I was checking the hash api from the std and I obesved that the getOrPut function does exactly what add does to without invoking two counts. It looks cleaner to me, but I don't really know if it's faster or actually better (have not benchmark it at all), but it could be worth looking into.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant