Skip to content
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

Implement binary_search for ink_storage::Vec #834

Closed
KaiserKarel opened this issue Jun 30, 2021 · 4 comments
Closed

Implement binary_search for ink_storage::Vec #834

KaiserKarel opened this issue Jun 30, 2021 · 4 comments
Labels
B-feature-request A request for a new feature.

Comments

@KaiserKarel
Copy link
Contributor

It seems that ink_storage::Vec is missing some useful methods, such as binary search. Is such a feature wanted?

@HCastano HCastano added the B-feature-request A request for a new feature. label Jun 30, 2021
@HCastano
Copy link
Contributor

Having binary_search seems reasonable to me. Feel free to open a PR

@Robbepop
Copy link
Collaborator

Robbepop commented Jul 1, 2021

I would love to see that!
Although we really need to make sure that its implementation does not waste gas by accessing unnecessary storage slots.

@KaiserKarel
Copy link
Contributor Author

KaiserKarel commented Jul 1, 2021

I think that for the search we will need to access storage for the comparison, but no more than that.

I'll get to writing a PR. It think I should be able to reuse most of core's implementation?

@HCastano
Copy link
Contributor

HCastano commented Jul 9, 2021

Closed by #836.

@HCastano HCastano closed this as completed Jul 9, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
B-feature-request A request for a new feature.
Projects
None yet
Development

No branches or pull requests

3 participants