-
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
Binary Search on Coins #3012
Comments
lol let's wait until we have at least 4 denoms on the hub before implementing this one |
Totally agree with you! Just creating the issue so we don't forget 😉 |
Hehe yeah. To be honest we probably would want to rearchitect the coins type completely to support thousands of denominations, unless most transaction load will be multi-asset transfers. |
@elias-orijtech this could be low-hanging fruit that we can get out with a method: .Search which firstly presumes that the coins are sorted and then can invoke sort.Search or a binary search implementation if the comparators are more specialized. |
.Find was implemented in May 2022 in PR #11959 by Robert Zaremba. I am going to close this feature request as completed. |
Ref: #2694 (comment)
Coins
should have a generic method that binary searches for a givenCoin
, so things likeAddCoinByDenom
andSubCoinByDenom
can work more efficiently./cc @cwgoes
For Admin Use
The text was updated successfully, but these errors were encountered: