-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Make sdk.Coins.Add more efficient #2627
Comments
coins.Add
more efficient
I think this has been addressed. Closing. cc @alexanderbez |
It looks like current implementation fully relies on coins being sorted lexicographically by coin.Denom and couldn't be optimized significantly. |
Agreed, the only place where we could get benefits is from the case where one adds a set of coins with many entries, and one with few entries. However since its stored in a sorted array, insert must be O(N), so there doesn't seem to be a notable performance benefit to be had. |
As proposed by @ValarDragon in #2385
The text was updated successfully, but these errors were encountered: